Category: Linux

How to create .htaccess file redirects

301 Redirect (this changes the url in the browser but still appends the domain to find url to the new domain)

RewriteEngine On
RewriteCond %{HTTP_HOST} ^www.domaintofind.com
RewriteRule (.*) http://www.newdomain.com/$1 [R=301,L

 

How useful was this post?

Click on a star to rate it!

Average rating / 5. Vote count: