New Posts
Welcome guest, is this your first visit?
  • Login:
Garner Hosting
+ Reply to Thread
Results 1 to 4 of 4
  1. #1
    Senior Member
    Creating
     

    Add as a friend
    Join Date
    Dec 2011
    Location
    Arlington
    Posts
    157
    Feedback Score
    8 (100%)

    Default htaccess workaround help

    So I am able to get any user with language "pt" to view my portuguese translated pages. But, lets say they wanted to read the english language versions by clicking a link? Rather than creating duplicate pages is there a way to work around it via htaccess or html?

    Here is the code I'm using now:

    #The 'Accept-Language' header starts with 'pt'
    RewriteCond %{HTTP:Accept-Language} (pt) [NC]
    RewriteRule ^party-poker.php$ Party Poker: Análise e Códigos de Bônus de Depósito [L]

    RewriteCond %{HTTP:Accept-Language} (en|pt) [NC]
    RewriteRule ^party-poker-en.php$ Party Poker: Review and Deposit Bonus Codes [L]

    And I'm not having any luck. The pages are redirecting but the first RewriteRule is overriding the 2nd everytime.

    Thoughts?

    Jeff
    USA Players | Free Poker Training

    Will write HQ poker strategy articles for links.

  2. #2
    Senior Member
    Rebmem Roines
     

    Add as a friend
    Join Date
    Nov 2008
    Location
    US
    Posts
    957
    Feedback Score
    23 (100%)

    Default

    You don't need to avoid duplicate content when doing translations if you tag them properly for G.

    I don't know how to make that first rule not overriding the second, as overriding is exactly what the first rule is supposed to do.

  3. #3
    Senior Member
    Creating
     

    Add as a friend
    Join Date
    Dec 2011
    Location
    Arlington
    Posts
    157
    Feedback Score
    8 (100%)

    Default

    So you're saying perhaps if I switched the two it would work? Worth a shot.

    I realize if I create a 3rd set of pages for all the sites that had -en in the title that it would work. But IMO there's got to be a better way than to create 3 sets of pages for only 2 languages.

    Jeff
    USA Players | Free Poker Training

    Will write HQ poker strategy articles for links.

  4. #4
    Senior Member
    Creating
     

    Add as a friend
    Join Date
    Dec 2011
    Location
    Arlington
    Posts
    157
    Feedback Score
    8 (100%)

    Default

    Got it to work finally. Removed a line from the .htaccess file and put in a <php> script at the top of the html page. Works great now .
    USA Players | Free Poker Training

    Will write HQ poker strategy articles for links.


 

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Powered by vBulletin® Version 4.1.5
Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.
SEO by vBSEO 3.6.0
Affiliate Program Consultant