Oops. Meant to send this to the list. :-)


Bill Moseley wrote:
> 
> At 07:29 PM 04/06/00 -0400, Rusty Foster wrote:
> >What I ended up doing was targeting cookies at a host (i.e.
> >domain=www.kuro5hin.org), and setting up VirtualHost sections as
> >follows:
> >
> >NameVirtualHost 216.181.35.174  # IP of www.kuro5hin.org
> >
> ># Redirect all hostless requests to www VHost
> ><VirtualHost 216.181.35.174>
> >    ServerName kuro5hin.org
> >    Redirect permanent / http://www.kuro5hin.org/
> ></VirtualHost>
> >
> ># Proper URI for www.kuro5hin.org
> ><VirtualHost 216.181.35.174>
> >  ServerName www.kuro5hin.org
> >  ...etc...
> ></VirtualHost>
> 
> Why not reverse the order of these virtual host sections so people without
> a Host: host go to the www.huro5hin.org virtual host?  Their URL will read
> wrong, but not much you can do about that.
> 

That's how it was originally, and they went to the right VHost, *BUT*
you recall that the original problem was cookies. I had to target my
cookies to 'www.kuro5hin.org', because there are other virtual hosts in
the same domain that get a different cookie with the same name. They
need to be distinguished by hostname, and the browser won't send a
cookie targeted at 'www.kuro5hin.org' to 'kuro5hin.org'. Hence, the URL
has to read right, for everything to work.

--R

> Bill Moseley
> mailto:[EMAIL PROTECTED]

-- 
=======================================================================
|      Rusty Foster       | "You can never entirely stop being what   |
|   [EMAIL PROTECTED]    | you once were. That's why it's important  |
|    [EMAIL PROTECTED]      | to be the right person today, and not put |
| http://www.kuro5hin.org | it off till tomorrow."        -Larry Wall |
=======================================================================

Reply via email to