问题
I have my .htaccess file redirecting all URLs to index.php?url=$1 as shown below:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?url=$1 [L]
But when the url is authenticate?code=blahblahblah the code= part is not pulled in, therefore meaning I cannot access it when handling the page D: Any help?
回答1:
You need the [QSA] flag then.
回答2:
use RewriteRule ^(.*)$ index.php?url=$1&%{QUERY_STRING} [L]
instead
来源:https://stackoverflow.com/questions/10139779/handling-get-with-htaccess