RewriteEngine On RewriteCond %{HTTP_HOST} ^www.domain.com$ [NC] RewriteRule ^(.*)$ http://domain.com/$1 [R=301,L]
You need to create an account or log in to post comments to this site.
11381 users tagging and storing useful source code snippets
Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world
RewriteEngine On RewriteCond %{HTTP_HOST} ^www.domain.com$ [NC] RewriteRule ^(.*)$ http://domain.com/$1 [R=301,L]
You need to create an account or log in to post comments to this site.
RedirectPermanent / http://domain.com/
in the <www.domain.com> Vhost section.
Using mod_rewrite has usually an impact on performance and honestly, I think the redirect approach is more elegant.