Home >Backend Development >PHP Tutorial >有一个问题,请徐祖宁版主帮助啊

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

WBOY
WBOYOriginal
2016-06-23 14:01:17955browse

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]

原来多了斜杠

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn