You have a domain anydomain.com, and you want a permanent redirect (301) to www.anydomain.com. You can do this using a .htaccess file. Here it is:
RewriteEngine on
RewriteCond %{HTTP_HOST}!^www.anydomain.com
RewriteRule ^(.*)$ http://www.anydomain.com/$1 [R=301,L]
So if someone types anydomain.com, he will be redirected to www.anydomain.com. easy.
Showing posts with label mod rewrite. Show all posts
Showing posts with label mod rewrite. Show all posts
Tuesday, October 9, 2007
Subscribe to:
Posts (Atom)