Boston Linux & Unix (BLU) Home | Calendar | Mail Lists | List Archives | Desktop SIG | Hardware Hacking SIG
Wiki | Flickr | PicasaWeb | Video | Maps & Directions | Installfests | Keysignings
Linux Cafe | Meeting Notes | Linux Links | Bling | About BLU

BLU Discuss list archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Apache Rewrite rules...



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.









BLU is a member of BostonUserGroups
BLU is a member of BostonUserGroups
We also thank MIT for the use of their facilities.

Valid HTML 4.01! Valid CSS!



Boston Linux & Unix / webmaster@blu.org