My SellerDeck Account | Newsletter | Free Trial

Community and Knowledge Base

  #1  
Old 11-Apr-2012, 05:49 PM
prsweeney prsweeney is offline
Registered User
Join Date: Apr 2012
Full Name: Patrick
Posts: 37
Thanks: 1
Thanked 5 Times in 5 Posts
Proper .htaccess setup?

It looks like our site needs some work on our .htaccess file as we are having some canonicalization issues. I see some suggestions on the forum but I want to know if anyone has something better than this or will it do the trick?

Code:
RewriteEngine On

RewriteCond %{HTTP_HOST} !^www\.example\.com$ [NC]
RewriteRule .? http://www.example.com%{REQUEST_URI} [R=301,L]
Thanks!
Reply With Quote
  #2  
Old 12-Apr-2012, 09:32 AM
leej's Avatar
leej leej is offline
Developers
Join Date: Aug 2003
Full Name: Lee Jackson
Posts: 198
Thanks: 10
Thanked 4 Times in 4 Posts
Hi there,
Am I right in thinking you want to force the http:// in with the domain? Our usual problem with client sites is the non www domain issue in which we use:

Code:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^domain.co.uk
RewriteRule (.*) http://www.domain.co.uk/$1 [R=301,L]
Regarding canonical links I have used the following link suggested here by Jonathan which has always seemed to work fine for us.
__________________
Regards.

Lee Jackson
Creative Director

Centurius Design & Marketing
Centurius Website
Portfolio of Work
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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



All times are GMT. The time now is 10:50 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.