Redirect a www prefixed site to a non-www prefix
Posted on July 10, 2007
I like clean URLs.
Add this to your .htaccess in the site root
RewriteEngine on
RewriteCond %{HTTP_HOST} .
RewriteCond %{HTTP_HOST} !^DOMAIN\.com
RewriteRule (.*) http://DOMAIN.com/$1 [R=301,L]
Related posts:
- .htaccess redirect based on requested domain
Imagine you have a selection of domain names that point to the same site, are... - Block Countries in Apache
Assuming you have mod_geoip installed in apache we can block certain countries in 6 lines... - Redirecting WordPress index.php to root
If you check the Page Rank of http://bloke.org against http://bloke.org/index.php, which are both, to a... - mod_geoip Revisted including stopping spam in phpBB 2
I've recently moved a client's forum onto a new cPanel server, previously it was on... - Site Performance Quick Fixes
I've been playing around with YSlow for a while now, now I decided to a...