.htaccess help

Discussion in 'HTML & Website Design' started by osmasters, Nov 28, 2009.

  1. #1
    Please tell me how can i do below thing by .htaccess.

    xyz.com/abc/pqr => xyz.com/index.php?state=abc&city=pqr

    Please help me.

    Thanks in advance.
     
    osmasters, Nov 28, 2009 IP
  2. Shyel

    Shyel Peon

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    try this

    RewriteEngine On
    RewriteRule ^([^/]*)/([^/]*)$ ./index.php?state=$1&city=$2 [L]
     
    Shyel, Nov 28, 2009 IP
  3. osmasters

    osmasters Well-Known Member

    Messages:
    453
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    100
    #3
    Thanks a lot buddy. It works.
     
    osmasters, Nov 28, 2009 IP