先上rewrite
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
#直接访问 http://www.abc.com/index.php?t=detail&sid=35
#伪静态 http://www.abc.com/detail/35.html
RewriteRule ^(.*)([a-z]+)/([0-9]+)\.html$ /index.php?t=$1&sid=$3
但是明明我的访问路径是
http://127.0.0.1/detail/35.html
但是我使用var_dump($_GET)
获得的信息如下
array(2) { ["t"]=> string(5) "detai" ["sid"]=> string(2) "35" }
为什么会是这样?
我应该获得t
这个参数应该是detail
才对