>>>>> "Ken" == Ken Y Clark <[EMAIL PROTECTED]> writes:
Ken> i'm just learning about the beautiful magic of the RewriteEngine. could
Ken> this be a good solution for you? in order to make sure cookies always
Ken> work properly on http://mp3.boston.com which is aliased as
Ken> http://music.boston.com, we use the following RewriteRule:
Ken> RewriteEngine on
Ken> RewriteCond %{HTTP_HOST} !^mp3\.boston\.com [NC]
Ken> RewriteRule ^/(.*) http://mp3.boston.com/$1 [L,R]
I think this also suffers from placing the burden on the client. The
[R] there with an external rewrite means that the client will get
redirected if it doesn't tell you the right "Host:" header. But
HTTP/1.0 and older browsers (and some spiders) will NOT tell you that
header, so you get in an infinite loop.
The solution is that you must allow for an unspoken "Host:" header to
fall through to a generic v-host.
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<[EMAIL PROTECTED]> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!