On Thu, August 25, 2005 12:42 pm, Jesse Planck said:
> Mod_Rewrite burns brain cells.
>
> It's actually an issue of redirecting to a location that just keeps on
> redirecting which creates a potentially hazardous loop.
>
> The solution is to exclude the DocumentIndex file and the single "/"
> for entry using RewriteCon. Just remember if your DocumentIndex is
> different from index.html or if you have more that one you will have
> to add RewriteCond(s).
>
> RewriteEngine on
> RewriteCond %{REQUEST_URI} !^/index.html$
> RewriteCond %{REQUEST_URI} !^/$
> RewriteRule ^/(.*) http://www.domain.com/ [R]
>
> Each RewriteCond acts as an or statement. The %{REQUEST_URI} pulls the
> "Get" from the http header. Notice the "!" in front of the "^" of
> couse that means "not". As usually the "^" is the start and the "$" is
> the end... I always forget the flippin "$"
>
> Once the request passes the mustard of RewriteCond it moves to the
> RewriteRule. There we say match everything and redirect to that
> domain... do a force redirect with [R]....
>
> Tada!
>
> I think that covers it.
>
> Jess
Thank you Jess. That also worked. :-)
David John
___________________
Nolug mailing list
nolug@nolug.org
Received on 08/25/05
This archive was generated by hypermail 2.2.0 : 12/19/08 EST