category/example.php?page=2 to /category/2.html

Discussion in 'Apache' started by ernest1a, Oct 28, 2009.

  1. #1
    Please could you help me how to write the rule to make 301 redirect from
    domainname.com/categoryname/example.php?page=4 to domainname.com/categoryname/4.html

    I tried RewriteRule ^domainname.com/(.[a-z]*)/example.php?page=(.[0-9]*)$ domainname.com/$1/$1.html [r=301,nc] but it is not working.

    thank you
     
    ernest1a, Oct 28, 2009 IP
  2. chadsmith

    chadsmith Peon

    Messages:
    82
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #2
    chadsmith, Oct 28, 2009 IP