Forum Moderators: phranque
RewriteEngine On
RewriteCond %{HTTP_HOST} ^mysite.com
RewriteRule (.*) http://www.example.com/$1 [R=301,L]
Need to implement:
redirect 301
oldpage.htm
http://www.example.com/newpage.htm
How do I do both?
[edited by: jdMorgan at 7:29 pm (utc) on May 19, 2006]
[edit reason] Example.com [/edit]
Did you flush your browser cache? If not, then you'll likely see the previously-cached response for that URL, and no request will be sent to your server. Therefore, the code will never run and can have no effect.
If it's not that, then the 'old URL' is incorrect. I've never heard of an Apache server without mod_alias loaded, so it's not likely to be that Apache doesn't understand a simple Redirect directive.
Jim
Excuse the example...maybe I am writing it wrong...
RewriteEngine On
RewriteCond %{HTTP_HOST} ^example.com
RewriteRule (.*) http://www.example.com/$1 [R=301,L]
Redirect 301 oldpage.htm http://www.example.com/newpage.htm
[edited by: jdMorgan at 8:47 pm (utc) on May 19, 2006]
[edit reason] Example.com [/edit]