Vish K
Vish K

Reputation: 137

.htaccess help needed rewrite

i have a problem,. i am creating a app in php, with the below code .htacces all links works fine.

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /courier/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*) /courier/index.php?view=$1 [L]
</IfModule>

now my links are like

http://localhost/courier/order-search/

But i have a search form with few fields, method is GET, so the link is like this below

http://localhost/courier/order-search/?test=a&test1=b

So , my question is how can i get the values of test and test1 fields using GET?

Thanks in advance.

Upvotes: 0

Views: 59

Answers (1)

Gerben
Gerben

Reputation: 16825

Add the QSA flag.

RewriteRule ^(.*) /courier/index.php?view=$1 [L,QSA]

Upvotes: 1

Related Questions