Handling GET with htaccess [duplicate]

爷,独闯天下 提交于 2019-12-25 05:11:57

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!