Php Apache重写使用后如何获取请求参数/
这是我的ApachePhp Apache重写使用后如何获取请求参数/,php,apache,url-rewriting,Php,Apache,Url Rewriting,这是我的Apache.htaccess文件的内容。在被Apache重写之后,我无法通过PHP的超级变量$\u request获得任何请求Uri 那我该怎么办?否则,将index.php/$1更改为index.php?$1 RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php/$1 [L
.htaccess
文件的内容。在被Apache重写之后,我无法通过PHP的超级变量$\u request
获得任何请求Uri
那我该怎么办?否则,将index.php/$1
更改为index.php?$1
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
问题是你想要什么。我们不能告诉你。最有可能的是
index.php?$1确实是您想要的。你为什么不直接测试一下呢?谢谢。现在,我使用$\u SERVER['REQUEST\u URI']来获取我想要的内容。当然,这也是可能的,但并不完全是直接的,因为它强制您手动解析URI。