Hi,For about a year now I've been running a personal webserver on my home computer (actually a spare) and have recently signed up with a web host due to increased need for more bandwidth and reliability. While in the transition to this new host, I was trying to figure out how to use mod_rewrite to redirect the traffic to my new server. I have the following in my root .htaccess file:
RewriteEngine onRewriteRule ^/(.+) http://www.newserver.com/$1 [R]
RewriteRule ^oldfile\.html$ /newfile.html [L]
10/3/2005 7:41:24 PM
With the rule that you have listed, the URL http://www.oldserver.com/ will not be redirected, but http://www.oldserver.com/foo should be. Try changing your rule to
RewriteRule ^/(.*) http://www.newserver.com/$1 [R,L]
10/4/2005 9:21:09 AM
You are a lifesaver. Thank you
10/4/2005 2:10:18 PM