Nov 22

To redirect a URL such as to use:

Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^yourdomain\.com
RewriteRule ^(.*)$$1 [R=permanent,L]

In the RewriteRule code, the R=permanent sets the type of redirection (permanent is 301; the default is temporary or 302). The L makes this the last Rule to use and stops rewrite processing.

written by MG \\ tags: , ,