Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Post New Thread Reply

Register GFY Rules Calendar
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 05-01-2006, 01:15 PM   #1
Snake Doctor
I'm Lenny2 Bitch
 
Snake Doctor's Avatar
 
Join Date: Mar 2001
Location: On top of my soapbox
Posts: 13,449
How do I redirect www.domain.com to domain.com?

I've heard you can do this in htaccess but I don't know the code.
Anyone have it handy?

Thanks
__________________
sig too big
Snake Doctor is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 05-01-2006, 01:33 PM   #2
cranki
Confirmed User
 
Join Date: Feb 2005
Location: Café del Mar
Posts: 5,162
this is from domain to www.domain ... maybe just switch it vice versa...

RewriteEngine On
RewriteCond %{HTTP_HOST} ^domain\.com [NC]
RewriteRule ^(.*)$ http://www.domain.com/$1 [R=301,L]
cranki is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 05-01-2006, 01:36 PM   #3
madawgz
8.8.8.8
 
madawgz's Avatar
 
Industry Role:
Join Date: Mar 2006
Location: Noordermarkt
Posts: 30,509
Quote:
Originally Posted by cranki
this is from domain to www.domain ... maybe just switch it vice versa...

RewriteEngine On
RewriteCond %{HTTP_HOST} ^domain\.com [NC]
RewriteRule ^(.*)$ http://www.domain.com/$1 [R=301,L]
whoa, some complicated scripting you got there
__________________
TAEMDLRMSKRJIXMRLSMRJ.
madawgz is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 05-01-2006, 01:46 PM   #4
Quickdraw
Confirmed User
 
Join Date: Mar 2004
Location: → → →
Posts: 1,717
There is more than one way, but I believe this should work

RewriteEngine on
RewriteCond %{HTTP_HOST} ^www\.domain\.com
rewriterule (.*) http://domain.com/$1 [R=permanent,L]
Quickdraw is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.