php - query string gets ignored after mod_rewrite -


i using following rewrite rule in .htaccess file send requests index.php file located @ root:

rewritecond %{request_filename} !-f rewritecond %{request_filename} !-d rewriterule (.*) index.php?q=$1 [l] 

as expected, urls example.com/users result in php receiving ["q"]=> string(5) "users" $_get variable.

urls example.com/users?fu=bar on otherhand not result in php receiving

["q"]=> string(5) "users",  ["fu"]=> string(3) "bar" 

what happening here, , how modify rule behave way?

you need add original query string:

rewriterule (.*) index.php?q=$1 [l,qsa]                                    ^^^ here 

Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -