brothercake
08-09-2002, 12:01 PM
What I'd like to do setup htacces to redirect *all* users to an /offline/ folder *unless* it's me - I can identify myself by the string token "brothercake" in my HTTP_USER_AGENT string
I know that mod_rewrite is needed for this, and I already have the .htacess for the /offline/ folder which turns the url rewriting engine off,to prevent an infinite loop, but what I'm looking for is the root .htaccess file that does the redirect in the first place.
I thought something like this
RewriteEngine on
RewriteBase /
RewriteCond %{HTTP_USER_AGENT} !^brothercake.*
RewriteRule [what goes here?] [R,L]
but I don't know what to put for the rule, or whether the rest of it is right anyway
I know that mod_rewrite is needed for this, and I already have the .htacess for the /offline/ folder which turns the url rewriting engine off,to prevent an infinite loop, but what I'm looking for is the root .htaccess file that does the redirect in the first place.
I thought something like this
RewriteEngine on
RewriteBase /
RewriteCond %{HTTP_USER_AGENT} !^brothercake.*
RewriteRule [what goes here?] [R,L]
but I don't know what to put for the rule, or whether the rest of it is right anyway