Home >Backend Development >PHP Tutorial >有一个问题,请徐祖宁版主帮助啊
http://localhost/yy/index.php/List/index/f/1.html
url重写成
http://localhost/yy/List/index/f/1.html
一直不成功呢?
提示
Not Found
The requested URL /index.php/List/index/f/1.html was not found on this server.
RewriteEngine on
RewriteCond $1 !^(index\.php|images|robots\.txt)
RewriteRule ^(.*)$ /index.php/$1 [L]
环境是Apache,写在.htaccess中
我测试最简单的
RewriteRule 1.php 2.php 倒是成功的,所以不能说urlrewrite没起作用
不懂,求解。
.htaccess 放在 yy 目录中
RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L]
原来多了斜杠