关于CodeIgniter URL的问题
默认情况下,index.php 文件将被包含在你的 URL 中:example.com/index.php/news/article/my_article 你可以很容易的通过 .htaccess 文件来设置一些简单的规则删除它。下面是一个例子,使用“negative”方法将非指定内容进行重定向:
RewriteEngine on
RewriteCond $1 !^(index\.php|images|robots\.txt)
RewriteRule ^(.*)$ /index.php/$1
以上是用户指南里的按照上面设置没用 求高人解答
RewriteEngine on
RewriteCond $1 !^(index\.php|images|robots\.txt)
RewriteRule ^(.*)$ /index.php/$1
这样就好了! 找到问题了
打开apache的配置文件,conf/httpd.conf :
LoadModule rewrite_module modules/mod_rewrite.so,把该行前的#去掉。
搜索 AllowOverride None(配置文件中有多处),看注释信息,将相关.htaccess的该行信息改为AllowOverride All。 谢谢热心的二楼 {:soso_e160:}
页:
[1]