Rewrite URL but keep GET variables

Discussion in 'Apache' started by okgaz, May 29, 2011.

  1. #1
    Hi everyone,

    I'm using this rule:
    RewriteRule ^(.*)/$ /index.php?get1=$1 [L]

    So I can have URLs like this:
    website.com/top-rated/

    Unfortunately when I add a GET variable such as this:
    website.com/top-rated/?p=2

    The variable is lost.

    Do you know a way I can modify the rule so that "p=2" will not be lost when it is rewritten?
     
    okgaz, May 29, 2011 IP