View Single Post
Old May 25th, 2008, 9:24 AM   #2 (permalink)
Ancyru
L'Awesome Advocate
Super #1
 
Ancyru's Avatar
 
Joined in May 2004
Lives in .au
Hosted on Mango
2,423 posts
Gave thanks: 1
Thanked 5 times
Personally I use the .htaccess method. This is an excerpt from a site that instructs you how to do that.

Quote:
Originally Posted by http://no-www.org
Class B means that all of the traffic to http://www.yourdomain.com is politely and silently redirected to http://yourdomain.com. This is currently the preferred no-www classification as it does not inconvenience your users, but it does assert the deprecated nature of the www subdomain.

The process of making your domain a Class B is quite simple. All you need to do is create or modify a file called .htaccess located in the root directory of your site and add the following lines, changing the red text to match your domain.

RewriteEngine On
RewriteCond %{HTTP_HOST} ^www\.domain\.com$ [NC]
RewriteRule ^(.*)$ http://domain.com/$1 [R=301,L]
In other words, in the root folder of your site make a file called .htaccess (open up notepad & type in this code then save it as .htaccess without the .txt) & inside the file put this:
Code:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www\.tellhim\.net$ [NC]
RewriteRule ^(.*)$ http://tellhim.net/$1 [R=301,L]
__________________
When I get sad, I stop being sad, and be AWESOME instead. True story.

Last edited by Ancyru; May 25th, 2008 at 9:29 AM.. Reason: Simplified.
Ancyru is offline   Reply With Quote
This user thanks Ancyru for this great post!
inthestars (May 25th, 2008)