Apache Rewrite rules...

Wizard wizard at neonedge.com
Mon Apr 7 13:30:46 EDT 2003


I'm new to mod_rewrite and I am trying to setup Rewrite rules on an apache
to redirect based upon browser version. I want anything that is not IE 4+
and NS6+ to use the /bc directory as the root. This is what I have
(.htaccess):
===============================================================
RewriteEngine  on

RewriteCond %{HTTP_USER_AGENT}  ^Lynx/.*              [OR]
RewriteCond %{HTTP_USER_AGENT}  ^Mozilla/[34].[0-9][0-9]*
RewriteRule ^/(*)\.html$          /bc/$1.html         [L]

RewriteRule ^/(*)\.html$          /$1.html            [L]
===============================================================
Anyone see any problems with this? Is this correct?
Grant M.








More information about the Discuss mailing list