2

I was wondering if it is possible to pass another variable through URL while already passing a variable using .htacces?

for example,

RewriteRule ^browse/([a-zA-Z-]+)/?$ browse/index.php?brand=$1

lets say, website.com/browse/index.php?brand=louis-vuitton was rewritten into website.com/browse/louis-vuitton

is it possible for me to use another variable like this:

website.com/browse/louis-vuitton/?sort=name
1
  • where would this variable come from? another part of the incoming url? Commented Feb 16, 2013 at 23:50

1 Answer 1

9

Yes it is, you simply add [QSA] After the rewrite condition

RewriteRule ^browse/([a-zA-Z-]+)/?$ browse/index.php?brand=$1 [QSA]

http://wiki.apache.org/httpd/RewriteFlags/QSA

Sign up to request clarification or add additional context in comments.

1 Comment

you deserve a +10! too bad Vote Up requires 15 reputation

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.