need htaccess help

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • rigo82
    Confirmed User
    • Aug 2009
    • 130

    #1

    need htaccess help

    Hello

    I need to rewrite ?lang=en with /en/ and also keep the posibility of using $_GET[lang]. How do i do that?

    I must emphasize that i want to use it on different URIs,

    for exemple i have links looking like:

    www.mydomain.com/category/amateurs?lang=en

    www.mydomain.com/blahblah.html?lang=en

    www.mydomain.com/list.php?tag=blahblah&lang=en


    Thanks
  • Barefootsies
    Choice is an Illusion
    • Feb 2005
    • 42635

    #2
    You may wanna hit up one of the board's programmers directly and see if you can get them to help you. Seems fairly simple for someone who knows what they are doing.
    Should You Email Your Members?

    Link1 | Link2 | Link3

    Enough Said.

    "Would you rather live like a king for a year or like a prince forever?"

    Comment

    • LoveSandra
      So Fucking Banned
      • Aug 2008
      • 10551

      #3
      bump bump

      Comment

      • GrouchyAdmin
        Now choke yourself!
        • Apr 2006
        • 12085

        #4
        Look into QSA for mod_rewrite to pass through and E= to set an enviornmental var. Not sure why you'd use a GET request over parsing HTTP_ACCEPT_LANGUAGE

        Comment

        • Wilsy
          Confirmed User
          • Oct 2009
          • 1865

          #5
          Edit and put this in your .htaccess file
          RewriteRule ^([a-zA-Z0-9]+)/$ yourpage.php?lang=$1 [L]
          works like yoursite.com/[lang]/

          You can do it like this and all vars will be passed allong too
          RewriteRule ^([a-zA-Z0-9]+)/$ yourpage.php?lang=$1%{QUERY_STRING} [L]
          Last edited by Wilsy; 05-26-2010, 11:22 AM.
          Affiliate Manager

          Comment

          Working...