Redirect URL and all subfolders in .htaccess

The following code will redirect you main URL and all of its sub folders and pages to a new page. This comes in quiet handy if you are moving a site with a lot of active pages.

Here is the code.

RewriteEngine on RewriteRule ^(.*)$ http://www.newdomain.com/$1 [R=301,L] 
Related eBooks
Share