Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

Coding Forum


You are currently viewing our Coding Forum as a guest. Please register to participate.
Login



Reply
How to forward domain.com to www.domain.com
Old 03-23-2007, 12:04 AM How to forward domain.com to www.domain.com
Novice Talker

Posts: 7
Trades: 0
How do I forward domain.com to www.domain.com ?

-thanks in advance, tommy
unl0ad is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 03-23-2007, 12:21 AM Re: How to forward domain.com to www.domain.com
Extreme Talker

Posts: 189
Trades: 1
Options +FollowSymLinks
RewriteCond %{HTTP_HOST} !^domain [NC]
RewriteRule ^/(.*)$ http://www.domain.com/$1 [L,R]

PS: I think you need to have mod-rewrite on.
__________________

Please login or register to view this content. Registration is FREE
yellow1912 is offline
Reply With Quote
View Public Profile Visit yellow1912's homepage!
 
Old 03-23-2007, 12:24 AM Re: How to forward domain.com to www.domain.com
DotHQ's Avatar
Super Talker

Posts: 104
Trades: 0
or you can do it with .htaccess
More info here:
http://httpd.apache.org/docs/1.3/howto/htaccess.html
__________________

Please login or register to view this content. Registration is FREE
Internet Marketing Forum New

Please login or register to view this content. Registration is FREE
Off Topic Forum FUN

Please login or register to view this content. Registration is FREE
Hosting, vBulletin Instalations & more ...

Last edited by DotHQ; 03-23-2007 at 12:26 AM..
DotHQ is offline
Reply With Quote
View Public Profile
 
Old 03-23-2007, 12:31 AM Re: How to forward domain.com to www.domain.com
Novice Talker

Posts: 7
Trades: 0
yellow, i added that to my htaccess , turned mod rewrite on and it did not work. Dothq i do not have time to learn this :/

ps: if i already had a rewrite rule, would this effect it? How eould i do it if so?

Last edited by unl0ad; 03-23-2007 at 12:34 AM..
unl0ad is offline
Reply With Quote
View Public Profile
 
Old 03-23-2007, 01:33 AM Re: How to forward domain.com to www.domain.com
Extreme Talker

Posts: 189
Trades: 1
I missed a .com there:

Options +FollowSymLinks
RewriteCond %{HTTP_HOST} !^domain.com [NC]
RewriteRule ^/(.*)$ http://www.domain.com/$1 [L,R]


This is taken from my own site's htaccess, it should work
__________________

Please login or register to view this content. Registration is FREE
yellow1912 is offline
Reply With Quote
View Public Profile Visit yellow1912's homepage!
 
Old 03-23-2007, 01:52 AM Re: How to forward domain.com to www.domain.com
Novice Talker

Posts: 7
Trades: 0
still doesnt work... can you recheck the code again. Thanks yellow
unl0ad is offline
Reply With Quote
View Public Profile
 
Old 03-23-2007, 04:25 AM Re: How to forward domain.com to www.domain.com
Extreme Talker

Posts: 189
Trades: 1
This should work:
Options +FollowSymlinks
RewriteEngine on
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]
__________________

Please login or register to view this content. Registration is FREE
yellow1912 is offline
Reply With Quote
View Public Profile Visit yellow1912's homepage!
 
Old 03-23-2007, 05:24 AM Re: How to forward domain.com to www.domain.com
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,519
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Assuming of course that you are hosted on Apache.
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 03-23-2007, 11:26 PM Re: How to forward domain.com to www.domain.com
The PHP Professor

Posts: 340
Name: Alex
Location: Behind You
Trades: 0
Quote:
Originally Posted by chrishirst View Post
Assuming of course that you are hosted on Apache.
well what are your basic server specs, i use:
PHP Code:
RewriteEngine On
RewriteCond 
%{HTTP_HOST} !^www
RewriteRule 
(.*) http://www.%{HTTP_HOST}/$1 [L,R=301] 
microcolt is offline
Reply With Quote
View Public Profile Visit microcolt's homepage!
 
Reply     « Reply to How to forward domain.com to www.domain.com
 

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 not edit your posts

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





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.45224 seconds with 12 queries