我目前正在从事一个项目,其中我的Apache documentroot与我的索引.php居住。奇怪的是,由于这个设置,我的$\u GET superglobal似乎被清空了。
目录结构:
-
/文档根
-
/Documentroot/.htaccess文件
第一次之后出现问题。htaccess已处理。
#First .htaccess in Apache documentroot:
RewriteEngine On
RewriteRule (.+) public/$1 [NC,L]
# Second .htaccess in /documentroot/public:
SetEnv APPLICATION_ENV testing
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ index.php [NC,L]
一些观察结果:
-
-
当你在公众场合抛售美元时/索引.php文件,它是空的
-
打电话的时候索引.php像/?foo=bar,$\u GET为空
-
打电话的时候索引.php就像/index.php?foo=bar$\u GET已填充
是什么导致$GET变量被清空?
编辑:事情变得非常奇怪: