.htaccess 我能';无法访问我的$\u GET数组

.htaccess 我能';无法访问我的$\u GET数组,.htaccess,get,.htaccess,Get,我想我已经用.htaccess文件吃掉了$\u GET参数。以下是.htaccess: # Rewrite directory path to index.php?page=dir/dir/page # Excludes any existing files so files can be called directly RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_URI} !index\.php [NC] RewriteR

我想我已经用.htaccess文件吃掉了$\u GET参数。以下是.htaccess:

# Rewrite directory path to index.php?page=dir/dir/page
# Excludes any existing files so files can be called directly
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} !index\.php [NC]
RewriteRule ^([^/]+)(.*)?$ index.php?page=$1$2   [L]
这一直运作良好。但是现在我需要向页面传递一些参数,我不知道如何让这些参数通过重写规则


我能够将参数视为$REQUEST_URI super-global的一部分,如果需要,我可以处理这些参数。但是我想让我的.htaccess规则正常工作。

我找到了答案。我需要将QSA(查询字符串附加)标志添加到重写规则中。现在,上面的重写规则为:

RewriteRule ^([^/]+)(.*)?$ index.php?page=$1$2   [L,QSA]