0

Below is my accessories page url

http://localhost/motobatt/index.php?route=information/static&p=62&b=59

and this page already can access using this url

http://localhost/motobatt/accessories

but now how to pass those query , url should be like this

http://localhost/motobatt/accessories&p=62&b=59

My .htaccess

RewriteBase /motobatt
RewriteRule ^accessories index.php?route=information/static&p=$1&b=$2
1
  • 1
    The query string is started with a question mark, not an ampersand. Commented Aug 29, 2013 at 10:19

1 Answer 1

1

Remove the &p=$1&b=$2 bit from your rule. There isn't any capture groups for the $1 or $2 to back reference so they'll just end up being blank. What you want is to use the QSA flag which will append any existing query string to the end of your rule's target:

RewriteBase /motobatt
RewriteRule ^accessories index.php?route=information/static [QSA]
Sign up to request clarification or add additional context in comments.

Comments

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.