icon Learn how to get the most out of Surmunity - read our forum tips here! | Welcome! Please register to access all of our features.

» Surpass Web Hosting Forums » Discussions » Shared Hosting » remove www domain redirect

Shared Hosting Questions about your shared hosting account.

Reply
 
LinkBack Thread Tools Search this Thread
Old May 14th, 2008, 3:25 PM   #1 (permalink)
Registered User
Fresh Surpasser
 
Joined in Feb 2008
1 posts
Gave thanks: 0
Thanked 0 times
remove www domain redirect

When I add a domain, domain.com automatically gets redirected to www.domain.com.

Is there any way to disable this behaviour so that when someone goes to domain.com, they stay there, but when someone visits www.domain.com they get redirected to domain.com (the opposite of what is happening now)
aniketh is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old May 14th, 2008, 3:50 PM   #2 (permalink)
Surpass Fan
Excelling Contributor
 
Joined in Dec 2005
Lives in .
Hosted on Pass49
578 posts
Gave thanks: 55
Thanked 9 times
I believe it can be done via .htaccess, also if you are using a portal software you can force it to reference without the www...
__________________
Server: Pass49
Site: Panache Web Ventures
panache is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old May 14th, 2008, 3:51 PM   #3 (permalink)
URB4N 5K1LLZ
Super #1
 
Roxy's Avatar
 
Joined in Sep 2005
Lives in Orlando, FL
Hosted on SH63
2,648 posts
Gave thanks: 81
Thanked 127 times
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]

Taken from this site www. is deprecated.
__________________
Roxanne
Surpass Staff

Urban Roxy -Personal Blog
SH63 - the best darn shared server!
Roxy is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On