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
Old 08-25-2007, 06:22 PM always www
Skilled Talker

Posts: 70
Name: Damien
Trades: 0
Does anyone know how to make all the visitors from http://mysite.com to silently be redircted to http://www.mysite.com? Similar to no-www but i actually appreciate www. Thanks.
__________________
-
Please login or register to view this content. Registration is FREE
-
-
Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE
-
Shattered is offline
Reply With Quote
View Public Profile Visit Shattered's homepage!
 
 
Register now for full access!
Old 08-25-2007, 06:32 PM Re: always www
Defies a Status

Posts: 3,420
Trades: 0
In your htaccess file, probably located in public_html, add the following code:

Quote:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^yourdomain\.com$ [NC]
RewriteRule ^(.*)$ http://www.yourdomain.com/$1 [R=301,L]
That should set you up fine and will redirect all visitors from the non-www address to www
CSS4Life is offline
Reply With Quote
View Public Profile
 
Old 08-25-2007, 07:40 PM Re: always www
Skilled Talker

Posts: 70
Name: Damien
Trades: 0
Didn't work for me
__________________
-
Please login or register to view this content. Registration is FREE
-
-
Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE
-
Shattered is offline
Reply With Quote
View Public Profile Visit Shattered's homepage!
 
Old 08-25-2007, 07:55 PM Re: always www
ForrestCroce's Avatar
Half Man, Half Amazing

Posts: 3,023
Name: Forrest Croce
Location: Seattle, WA
Trades: 0
Whym made a typo; the filename is .htaccess and should be in the root folder of your site. If you're running an Apache server that should work.
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
ForrestCroce is offline
Reply With Quote
View Public Profile Visit ForrestCroce's homepage!
 
Old 08-25-2007, 10:34 PM Re: always www
dansgalaxy's Avatar
Defies a Status

Posts: 6,522
Name: Dan
Location: Swindon
Trades: 0
Is it jsut me that hates sites with www. some sites dont work without it which i find pathtic and givves me a bad impression of the site and how its run.

i prepose we ditch the www.
__________________
Discounted Web Hosting With XDnet!
>> Get 25% of hosting~ Promo: Webmaster-talk <<

Please login or register to view this content. Registration is FREE
dansgalaxy is offline
Reply With Quote
View Public Profile Visit dansgalaxy's homepage!
 
Old 08-27-2007, 03:37 PM Re: always www
Skilled Talker

Posts: 51
Trades: 0
I'm a non-www type guy myself. I just did some work for a client that had canonical issues (www.domain.com and domain.com were the same page). Ended up making all the urls www so search engines wouldn't think it was two different pages with duplicate content. Most the backlinks were the www version. Does anyone know if it hurts to change all your url's to domain.com if your backlinks all say www at the beginning?

btw, thanks for the code, whym.

Last edited by Sandman420; 08-27-2007 at 03:39 PM..
Sandman420 is offline
Reply With Quote
View Public Profile
 
Old 08-28-2007, 08:21 AM Re: always www
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,517
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Quote:
Does anyone know if it hurts to change all your url's to domain.com if your backlinks all say www at the beginning?
Yes it will, even 301 redirecting will kill your rankings for several weeks/months and it can be many months before the external backlink value catches up.
__________________
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 offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Reply     « Reply to always www
 

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.64112 seconds with 12 queries