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.

Website and Server Administration Forum


You are currently viewing our Website and Server Administration Forum as a guest. Please register to participate.
Login



Reply
Issues with 301 redirect to force www
Old 03-03-2010, 01:53 PM Issues with 301 redirect to force www
Junior Talker

Posts: 1
Trades: 0
Hello Everyone,

So I am having issues forcing www for the entire website.

The weird thing is that if I browse on a regular browser the redirect seems to put itself.

but when I do a redirect check on

http://www.webconfs.com/redirect-check.php

it shows that my http://www.domain.com/folder redirects to http://domains.com/folder

The FUNNY thing is that is i rediret check http://www.domains.com/folder/ (notice the trailing /), then it tells me there is no redirect.

I have one htaccess in the root of my domain that is as follows:

RewriteEngine On
RewriteCond %{HTTP_HOST} ^domain\.com [NC]
RewriteRule (.*) http://www.domain.com/$1 [L,R=301]

This is creating MANY issues when I do crawl tests on my domain, i get MANY 301 results... The weird thing is that on normal and regular browsing, it doesn't show the same effect at all, it does redirect correctly.

Can anyone help please?
lazouche is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 03-04-2010, 01:48 PM Re: Issues with 301 redirect to force www
whhelpguy's Avatar
Average Talker

Posts: 19
Name: Blue
Location: Los Angeles
Trades: 0
lazouche, seems like your syntax is just a tad off. Try this one out...

Options +FollowSymlinks
RewriteEngine on
rewritecond %{http_host} ^domain.com [nc]
rewriterule ^(.*)$ http://www.domain.com/$1 [r=301,nc]

Hope it works out for you!

Last edited by whhelpguy; 03-04-2010 at 01:49 PM.. Reason: coding split...
whhelpguy is offline
Reply With Quote
View Public Profile Visit whhelpguy's homepage!
 
Old 03-05-2010, 02:19 AM Re: Issues with 301 redirect to force www
SpecHosting's Avatar
Super Talker

Posts: 142
Name: Tanner Bradley
Location: Knoxville Tennessee
Trades: 0
Quote:
Originally Posted by whhelpguy View Post
lazouche, seems like your syntax is just a tad off. Try this one out...

Options +FollowSymlinks
RewriteEngine on
rewritecond %{http_host} ^domain.com [nc]
rewriterule ^(.*)$ http://www.domain.com/$1 [r=301,nc]

Hope it works out for you!
Justing adding to this, it takes some time for the permanent redirect to actually become "permanent". You might see a lot of hits to a temporary redirect for some time, this is normal and should subside over time!
__________________

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
Servers Dedicated Servers

Please login or register to view this content. Registration is FREE
Now Offering: FREE WHMCS Licenses|FREE SSL Certificate|End User Support

SpecHosting is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Issues with 301 redirect to force 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.26501 seconds with 12 queries