[thelist] Quick Mod Rewrite Question

Andy Budd andy at message.uk.com
Fri Jun 25 05:47:02 CDT 2004


I'm wanting to redirect all traffic from one site to the homepage of 
another site as it's closing down.

rewriteEngine On
rewriteCond %{HTTP_HOST} ^www.mysite.co.uk$ [NC]
rewriteRule ^.*$ http://www.newsite.co.uk/ [R,L]

works fine. However if I add in another cond to catch anybody not using 
www.

rewriteEngine On
rewriteCond %{HTTP_HOST} ^mysite.co.uk$ [NC]
rewriteCond %{HTTP_HOST} ^www.mysite.co.uk$ [NC]
rewriteRule ^.*$ http://www.newsite.co.uk/ [R,L]

The rules stops working for either condition. I'm sure it's something 
obvious, but am not sure what the problem is. Any ideas?


Andy Budd

http://www.message.uk.com/



More information about the thelist mailing list