httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lance Campbell <>
Subject [users@httpd] cannot get RewriteRule for just the document root to work
Date Fri, 18 Feb 2011 19:15:40 GMT
Assume my site is:

The following redirects and works as expected:

RewriteCond %{HTTP_USER_AGENT} iPhone.* 
RewriteRule ^/index.html [R,L]

So if I go to it redirects me to the
mobile.html page.

BUT if I go to it does not redirect me.

So I thought the following would work but it does NOT:

RewriteCond %{HTTP_USER_AGENT} iPhone.* 
RewriteRule ^/ [R,L]

How do I get just the base root to redirect?  I do not want other pages
within the site to redirect.

So would NOT redirect.



Lance Campbell
Project Manager/Software Architect/DBA
Web Services at Public Affairs

View raw message