httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lance Campbell <la...@illinois.edu>
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: acme.com

The following redirects and works as expected:

RewriteCond %{HTTP_USER_AGENT} iPhone.* 
RewriteRule ^/index.html
http://test.webservices.illinois.edu/mobile.html [R,L]

So if I go to http://acme.com/index.html it redirects me to the
mobile.html page.

BUT if I go to http://acme.com/ it does not redirect me.

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

RewriteCond %{HTTP_USER_AGENT} iPhone.* 
RewriteRule ^/   http://test.webservices.illinois.edu/mobile.html [R,L]

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

So http://acme.com/abc.html would NOT redirect.

-- 

Thanks,

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






Mime
View raw message