This is my rewrite rule
RewriteRule ^(.+)$ index.php?uri=$1 [QSA,L]
When I go to this url
http://localhost/ub/ab?uri=cd
$_GET['uri'] returns cd, instead ab.
How to get $_GET['uri'] returns ab? Or is this the real behavior of QSA?
thanks,
EDIT
the .htaccess file is in ub directory, ab directory is never exist.
Don’t use $_GET to to retrieve the uri parameter – .htaccess rules don’t override the URI that’s presented to your script, so you can retrieve the “ab” portion of the URI by parsing
$_SERVER['REQUEST_URI'].I’ve seen several PHP applications – such as Joomla! and Magento – whose .htaccess files simply redirect everything to “index.php”, and leave it to the PHP routing code to translate the URI into a page to display.