1

i can't access my GET parameter due to htaccess.

my htaccess is following

RewriteRule ^search/?$ cms/productSearch.php?caller=search [NC,L]

and my url is

http://localhost/demo/search?src=a

how can i access both GET parameters

1 Answer 1

3

Add QSA flag:

RewriteRule ^search/?$ cms/productSearch.php?caller=search [NC,L,QSA]

QSA flag (Query String Append) is used to preserve existing query string while adding new query parameters.

Reference: Apache mod_rewrite Introduction

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.