[ic] rewite rules killed images - and cookies

Philip S. Hempel interchange-users@icdevgroup.org
Thu Sep 26 21:53:01 2002


DB wrote:
>  >> Rewrite rules
> 
>>>
>>>  >         RewriteRule ^$ /cgi-bin/vlink/index.html [PT,L]
>>>  >         RewriteRule ^/$ /cgi-bin/vlink/index.html [PT,L]
>>>  >         RewriteRule ^/index\.html$/cgi-bin/vlink/index.html [PT,L]
>>>  >        RewriteRule ^/cgi-bin/vlink/.* - [PT,L]
>>>  >         RewriteRule ^/.*images/.* - [PT,L]
>>>  >        RewriteRule ^/(.*) /cgi-bin/vlink/$1 [PT,L]
>>>
>>>
>>> Does this affect the cookies?
>>>
>>> From my limited experience trying to do something similar, yes it does
>>
>> affect cookies.
>> The cookie path is set in interchange.cfg, when you declare your
>> catalog. You should be able to either add another alias, e.g.,
>>
>> Catalog simple alias /
>>
>> which will send another cookie (but at least one that should work), or
>> replace the path in the Catalog declaration of your store. There's 
>> some caveats
>> about this path being unique on your server unless you use FullURL 
>> directive as well.
>> (See the Catalog directive in icconfig.)
>>
>> I'm on a shared host, so I can't confirm that this works, as it must be
>> changed in the
>> Interchange.cfg file. (Can it be overridden, anyone?)
> 
> 
> It seems you are correct. I modified my interchange.cfg to read
> 
> Catalog       store /home/mandd/catalogs/store  /cgi-bin/store /
> 
> and now the rewrite rules generate one invalid cookie, but then a valid 
> cookie. Thanks! I'll now add rewrite rules for robots.txt and 
> favicon.ico, then all should be well.
> 

Yes test and confirmed the settings that DB used and I also,
have seemed to create a proper cookie for this
configuration.

But why is it still required to create this original cookie
that points to the CGI?
Would it be enough to have the "/" as an alias not have to
reference the CGI? I realize that IC needs to know the name
of the catalog, but I understand that it could get it from
config prior to the alias.

Great work, I will myself test this for a while and see if
it is stable or not.

-- 
	-------------------------
	    Philip S. Hempel
debian/rules