please help with a small .htaccess problem

Discussion in 'Apache' started by Dayon, May 9, 2007.

  1. #1
    Hi,

    My .htaccess file has the following, which works fine:

    RewriteRule ^([\(\)A-Za-z0-9-]+)/?$ index.php?view1=$1 [L]
    RewriteRule ^([\(\)A-Za-z0-9-]+)/([\(\)A-Za-z0-9-]+)/?$ index.php?view1=$1&view2=$2 [L]
    RewriteRule ^([\(\)A-Za-z0-9-]+)/([\(\)A-Za-z0-9-]+)/([\(\)A-Za-z0-9-]+)/?$ index.php?view1=$1&view2=$2&view3=$3 [L]
    Code (markup):
    An example of that is does:
    If you went to => mysite . com/artwork/108/
    the query would be => view1=artwork&view2=108


    I've been happily working with this for months.


    But i've now come to a problem and need query marks to work.
    I need => mysite . com/artwork/108/?thingone=jack&thingtwo=jill

    Does anyone know how i can make these additions work?
     
    Dayon, May 9, 2007 IP
  2. rodney88

    rodney88 Guest

    Messages:
    480
    Likes Received:
    37
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Use the Query String Append flag - so replace [L] with [L,QSA] on all three rules.
     
    rodney88, May 9, 2007 IP