当前位置:Gxlcms > PHP教程 > 有一个问题,请徐祖宁版主帮助啊

有一个问题,请徐祖宁版主帮助啊

时间:2021-07-01 10:21:17 帮助过:11人阅读

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]

原来多了斜杠

人气教程排行