Redirect a whole websites using .htaccess

To redirect every page of your website to one single new page automatically using your .htaccess file you should install this code into your .htaccess file:

Options +FollowSymLinks
RewriteEngine on
RewriteRule (.*) http://www.new-domain-name.com

This code will redirect every page to that one single page

On the other hand you might have a new domain name and need to redirect every page to your new domain, but want to keep all the same extensions, to do this install this code into your .htaccess file:

Options +FollowSymLinks
RewriteEngine on
RewriteRule (.*) http://www.new-domain-name.com/$1 [R=301,L]

This code will redirect to your new domain name with the same extension.

Post comment as twitter logo facebook logo
Sort: Newest | Oldest

I enjoyed the article and thanks because of posting such valuable tidings seeking all of us to present-day, I bring in it both of resource to and illuminating and I mesa to array it as commonly as I can.

ray ban 3025