.htaccess

Discussion in 'vBulletin Discussions' started by Bandit, Jul 30, 2009.

  1. Bandit

    Bandit Addict

    Joined:
    May 28, 2009
    Messages:
    51
    Likes Received:
    0
    First Name:
    Mark
    Hi guys, sorry i haven't been around much lately. been really busy getting the ATS ready for the 1st course next week.

    I have a problem I need help with though...

    I'm trying to edit my .htaccess file, so that I can make the url: freeadz.org redirect to www(dot)freeadz.org, so that I can avoid the whole 'Duplicate Content' issue with google.

    How do I do this?
     
  2. Mike

    Mike Adept

    Joined:
    May 23, 2009
    Messages:
    137
    Likes Received:
    88
    Location:
    Lafayette, IN, USA
    First Name:
    Mike
    Code:
    RewriteCond %{HTTP_HOST} !^www\.freeadz\.org
    RewriteRule (.*) http://www.freeadz.org/$1 [R=301,L]
    That should fix you up.
     
  3. Bandit

    Bandit Addict

    Joined:
    May 28, 2009
    Messages:
    51
    Likes Received:
    0
    First Name:
    Mark
    This is what I have in my public_html directory s the .htaccess info:

    Code:
    
    
    #RewriteRule ^/?$ "http\:\/\/www\.freeadz\.org\/forum" [R=301,L]
    #RewriteRule ^forums$ "http\:\/\/www\.freeadz\.org\/forum" [R=301,L]
    
    RewriteCond %{HTTP_HOST} ^freeads.gfxnation.com$ [OR]
    RewriteCond %{HTTP_HOST} ^www.freeads.gfxnation.com$
    RewriteCond %{HTTP_HOST} ^freeadz.org$ [OR]
    RewriteCond %{HTTP_HOST} ^www.freeadz.org$
    RewriteCond %{HTTP_HOST} ^freeadz.org$ [OR]
    RewriteCond %{HTTP_HOST} ^www.freeadz.org$
    RewriteRule ^forums$ "http\:\/\/www\.freeadz\.org\/forum\/" [R=301,L]
    
    Options +FollowSymlinks
    rewritecond % ^freeadz.org/forum/ [nc]
    rewriterule ^(.*)$ http://www.freeadz.org/forum/$1 [r=301,nc]
    
    RewriteCond %{HTTP_HOST} ^freeadz.org$
    RewriteRule ^forum\/?$ "http\:\/\/www\.freeadz\.org\/forum\/" [R=301,L]
    
    So shouldn't that work? Or have I missed something?
     
  4. Bandit

    Bandit Addict

    Joined:
    May 28, 2009
    Messages:
    51
    Likes Received:
    0
    First Name:
    Mark
    Never mind, I managed to get it working. Thanx for the help :)
     

Share This Page