1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

.htaccess question

Discussion in 'White Hat SEO' started by majestry, Oct 28, 2009.

  1. majestry

    majestry Junior Member

    Joined:
    Nov 14, 2008
    Messages:
    161
    Likes Received:
    25
    Occupation:
    this is work?
    Location:
    NYC
    So, I am using a shared hosting account on hostgator and I'm trying to modify my htaccess files so that my addon domains don't get penalized for dupe content. I have one quick question. Do I add the following to the addon domain htaccess or do I replace the addon domain htacess with it.

    Options +FollowSymlinks
    RewriteEngine OnRewriteCond %{HTTP_HOST} ^addondomain\.co.uk [NC]
    RewriteRule ^(.*) http://www.addondomain.co.uk/$1 [R=301,L]

    RewriteCond %{HTTP_HOST} ^www.addondomain.the-hosting-domain\.co.uk
    RewriteRule ^(.*)$ http://www.addondomain.co.uk/$1 [R=permanent,L]

    RewriteCond %{HTTP_HOST} ^addondomain.the-hosting-domain\.co.uk
    RewriteRule ^(.*)$ http://www.addondomain.co.uk/$1 [R=permanent,L]

    Obviously that's just a template but my current htaccess file is


    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>

    # END WordPress

    So do I add the first inbetween the wordpress lines or within the ifmodule or do I just replace everything between the wordpress with the top lines of code or do I replace EVERYTHING. I'm not too familiar with this programming language so any help would be great.
     
  2. whatsup

    whatsup Registered Member

    Joined:
    Feb 2, 2008
    Messages:
    50
    Likes Received:
    7
    Guess I'm not the only one not understanding your question. Please try us to tell us what you want to accomplish.
     
  3. richim1

    richim1 Guest

    Code:
    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    #[COLOR="Red"][B]INSERT HERE[/B][/COLOR]#
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    
    # END WordPress
    
     
    • Thanks Thanks x 1