RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/?$1 [L]
以上是htaccess中写的内容
能够隐藏index.php
首页可以打开
但是跳转后的URL变成这样
http://localhost//xxx/xxx
出现了两个/
应该要怎么设置
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/?$1 [L]
以上是htaccess中写的内容
能够隐藏index.php
首页可以打开
但是跳转后的URL变成这样
http://localhost//xxx/xxx
出现了两个/
应该要怎么设置
跟你多出一个“/”没关系,检查下跳转的url。