4 replies
Hi all,

Could someone please provide me with the code to implement a 301 redirect, used to prevent duplicate content, on an Apache Web server.


Thanks,

Terry
#301 #redirects
  • Profile picture of the author Mike McAleer
    Try another section of the forum I know that there are people who can help you.
    Signature

    Recent domain flips : $8->$1000 Social recruiting Software dot com $8->$2000 MobileSalesSoftware.com
    Invest in domains without the hard work !
    Email for details...Mike McAleer at me dot com

    {{ DiscussionBoard.errors[3400851].message }}
  • Profile picture of the author Rus Sells
    I don't know the code but I am pretty sure 301 redirects are a basic feature offered in most hosting control panels. Snoop around yours and you should be able to find it.
    {{ DiscussionBoard.errors[3400856].message }}
  • Profile picture of the author Marketing Cheetah
    I think this is the most appropriate forum for this question:Website Design
    You will surely get many answers
    However, here is answer to your question: Google
    That is the easiest solution. htaccess can do wonders.
    {{ DiscussionBoard.errors[3400874].message }}
  • Profile picture of the author The Big Deal
    So I think what you are saying is you don't want Google to see your site as Both http://domain.com and http://www.domain.com correct? Because the www is essentially considered a subdomain. I'm not sure how important this is anymore these days but the code in your htaccess would go something like this:
    Code:
    # To redirect all users to access the site WITH the www.
    # (http://basic-example.com/... will be redirected to http://www.basic-example.com/...)
    
    RewriteEngine On
    RewriteCond %{HTTP_HOST} !^www.basic-example.com$ [NC]
    RewriteRule ^(.*)$ http://www.basic-example.com/$1 [L,R=301]
    So basically what this does is if someone goes to http://basic-example.com they will get automatically redirected to http://www.basic-example.com instead.
    {{ DiscussionBoard.errors[3401440].message }}

Trending Topics