0

I am currently wanting to enable $_GET parameters in my framework.

My current htaccess-file is like this, BUT it doesn't pass the ?param=param :(

<IfModule mod_rewrite.c>

RewriteEngine On

RewriteCond %{THE_REQUEST} \ /{2,}([^\?\ ]*)
RewriteRule ^ /%1 [L,R=301,QSA]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule ^.*$ index.php?url=$0 [NC,L]

</IfModule>

When I try to go to this URL:

http://www.domain.com/test?test=test

All that gets passed is "test"

How can I make it possible to also pass $_GET-parameters?

4

1 回答 1

2

您需要添加QSA到您的 RewriteRule:

RewriteRule ^.*$ index.php?url=$0 [NC,L,QSA]

QSA 代表查询字符串附加

于 2013-10-28T23:52:17.253 回答