Express Hosting
"We are the official hosting company of UBB.threads. Ask us about our free migration services to migrate your UBB.threads installation."
#194057 - 08/07/0708:38 PMRe: How do I force all "non-WWW" url requests to my "www" domain?
[Re: Gizmo]
Registered: 06/05/06
Posts: 14904
Loc: Portland, OR; USA
Due to the non-www stance some users use, I'm also going to describe how to send all www requests to the non-www domain... Be sure that you're not using both of these as you could cause a lot of looping on your webserver.
The instructions above are still valid, however, use this .htaccess block.
Code:
# Allow Re-Writing
RewriteEngine on
# Redirect WWW URLs to non-www
RewriteCond %{HTTP_HOST} ^www.corthell.net$
RewriteRule ^(.*) http://corthell.net/$1 [QSA,L,R=301]