Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 2 of 2
  1. #1
    Senior Member bamme's Avatar
    Join Date
    Aug 2009
    Posts
    319
    Member #
    19662
    Liked
    1 times
    Hi everyone,

    Ive read about canonical URLs and want to make sure to avoid non-canonical URLs in my new site

    Ive found http://css-tricks.com/snippets/htaccess/www-no-www/ and pasted the first snippet into a blank .htaccess file

    I then uploaded it to the /public_html/ d directory of my site.

    I can now not visit http://www.mysite.com, I get a 500 internal server error but http://mysite.com works fine..

    Can anyone help me?

  2.  

  3. #2
    Member
    Join Date
    Dec 2009
    Location
    Cambridge UK
    Posts
    60
    Member #
    20543
    Liked
    1 times
    Hi Emma

    I use the following .htaccess on all my sites without any problems.

    Code:
    RewriteEngine on
    RewriteCond %{HTTP_HOST} ^my-site.com
    RewriteRule ^(.*)$ http://www.my-site.com/$1 [R=301,L]
    It looks similar to yours (but not the same) But I know it works.

    I also set my preference to www.my-site.com in Google webmaster tools.

    Rich


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 02:52 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com