Forum Moderators: phranque
I tried the following in my .htaccess file, and it did not work:
redirect 301 /olddir/ [newdomain.com...]
Any suggestions?
You need to use RedirectMatch to explicitly tell mod_alias [httpd.apache.org] to drop the trailing path info:
RedirectMatch 301 ^/olddir/(.*)$ http://www.example.com/newfile.html
That worked great! Thank you so much! You are the man...
On thing though... I had to take this line of code out for it to work:
RewriteRule ^(.*)$ http://www.example.com$1 [R=301,L]
How can I still redirect a request to the main old domain to the new main domain without having that cancel out the sub domain requests?
[edited by: jdMorgan at 8:32 pm (utc) on Dec. 18, 2007]
[edit reason] example.com [/edit]
Jim
[edited by: jdMorgan at 8:32 pm (utc) on Dec. 18, 2007]