Hi all, Hope that you can help. I would like to re-direct www.olddomain.com and all of its files and subdirectories (like www.olddomain.com/test.html) to the index of www.newdomain.com I tried to use the following code: Redirect 301 / http://www.newdomain.com/ It worked great when I hit www.olddomain.com but when I tried to hit www.olddomain.com/test.html it tried to bring me over to www.newdomain.com/test.html not to the index file of the newdomain.com (not what I wanted it to do as it won't work b/c that file doesn't exist anymore). I would appreciate any help you can offer. Thanks again! A
Hi, I would try this: Options +FollowSymlinks RewriteEngine on RewriteCond %{HTTP_HOST} ^www.oldomain.com$ RewriteRule ^(.*) http://www.newdomain.com/ [L,R=301] Code (markup): Jean-Luc
Options +FollowSymLinks +Indexes RewriteEngine on RewriteBase / RewriteRule ^(.*)$ http://www.newdomain.com/ [R=301,L]
Hi Jean-Luc, Thanks for your reply! Unfortunately that didn't seem to work. With that .htaccess file in place it didn't re-direct at all (when going to both www.olddomain.com and www.olddomain.com/test.html) Any other ideas? Thanks again, A
Nintendo, Thanks a ton...that seemed to do a trick! Now, my question for you is, do I loose loose page ranks with this method? I thought that using a 301 was the best way to go so that you don't loose page ranks. Any thoughts? Thanks! A
I am trying to do one more simple redirect, while keeping my existing redirect intact. While still redirecting to the newdomain (as per below) I would like to make an exception and redirect one specific file as such: www.olddomaincom/pdf/notes.pdf to www.newdomaincom/images/stories/notes.pdf Below is what I am currently using. Options +FollowSymLinks +Indexes RewriteEngine on RewriteBase / RewriteCond %{REMOTE_HOST} !^ipaddress\.ipaddress\.ipaddress\.ipaddress RewriteRule ^(.*)$ http://www.newdomain.com/ [R=301,L] Thanks again for any help you can provide, I just can't seem to get it!
RewriteRule ^pdf/notes.pdf$ http://www.domain.com/images/stories/notes.pdf [R=301,L] I think after the RewriteRule ^(.*)$ http://www.newdomain.com/ [R=301,L]