I have just moved a domain and would like to know how to redirect everything from the old domain to the new domain. With the following code it redirects all pages to the new domain Code: RewriteCond %{HTTP_HOST} ^.*oldwebsite\.com$ [NC] RewriteRule ^(.*)$ http://www.newwebsite.net/$1 [R=301,L] so oldwebsite.com -> newwebsite.net The problem is that oldwebsite.com/folder/file1.html is also -> newwebsite.net What is the code for having oldwebsite.com/folder/file1.html automaticly redirecting to newwebsite.net/
I'm not sure what you're asking for but I think mod_alias might work better in this case: Redirect 301 / http://www.newwebsite.net/ Code (markup):