Redirect All page from www.example.com to example.com

by Vinoth 2009-10-06 16:15:16

If you want all the page in your website should be http://exampe.com/* format then you need to redirect http://www.example.com/* to http://example.com.
It can done by adding the below code in .htaccess

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


Please change example.com with your host name

Tagged in:

1626
like
1
dislike
0
mail
flag

You must LOGIN to add comments