机器脑 发表于 2014-9-21 00:18:48

URL怎么去掉index.php入口文件啊

本帖最后由 机器脑 于 2014-9-21 00:18 编辑

目录结构:http://localhost/lian1/index.php
我ci文件都放在lian1文件下,没放在根目录下
Apache重写模块已经开启,并且重启Apache;

我的.htaccess文件内容:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1

这是报的错误
Not FoundThe requested URL /lian1/news/2.html was not found on this server.

求大神帮忙解决,小弟在此谢过
512529940

smallerpig 发表于 2014-9-22 10:36:35

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /lian1/index.php?/$1

确保你已经打开了rewrite模块
页: [1]
查看完整版本: URL怎么去掉index.php入口文件啊