Here’s how the .htaccess gets written to permanently redirect visitors and search engines:
[php]
RewriteEngine on
RewriteCond %{HTTP_HOST} ^inflatableboats4less.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.inflatableboats4less.com$
RewriteRule ^aboutus\.php$ "http\:\/\/www\.inflatableboats4less\.com\/boats\/index\.php\?id\=2" [R=301,L]
[/php]
First, you need to turn on the RewriteEngine.

The first rewrite statement is without the ‘www’, the second one includes the ‘www’.

The RewriteRule takes users from the requested aboutus.php page to the full URL of the new page.

The [R=301,L] at the end of the rule tells the search engines that this is a permanent change, and to update their links.

Random Posts

 

Comments are closed.