【发布时间】:2018-08-06 01:08:32
【问题描述】:
我想我已经用我的 .htaccess 文件吃掉了 $_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]
这一直运作良好。但是现在需要给pages传一些参数,不知道怎么让参数通过rewrite rule。
我可以将这些参数视为超级全局 $REQUEST_URI 的一部分,如果需要,我可以对其进行处理。但想让我的 .htaccess 规则正常工作。
【问题讨论】: