用户
 找回密码
 入住 CI 中国社区
搜索
查看: 3032|回复: 5
收起左侧

[已解决] index.php无法去掉

[复制链接]
发表于 2009-8-13 09:33:55 | 显示全部楼层 |阅读模式
在本地我按照使用说明, 能够去掉index.php  
但是上传到服务器后就 一直跳转到首页 ~~(加上index.php就能跳转过去)
我的.htaccess文件内容:
<IfModule mod_rewrite.c>
Options +FollowSymLinks
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond $1 !^(index\.php|images|robots\.txt)
RewriteRule ^(.*)$ index\.php/$1 [L]
</IfModule>
我在服务器测试过 :
RewriteRule eeee.html$ 2.php [L]  
这个能正常跳转
    谁帮帮忙啊~~~~急啊
发表于 2009-8-13 10:17:19 | 显示全部楼层
看起来好像没什么问题吧,不过我对 rewrite 规则不熟悉,呵呵
 楼主| 发表于 2009-8-13 10:29:27 | 显示全部楼层
谢谢~~~
他不能正常跳转啊~~~不管点那个连接都还是在首页
我曾经把 RewriteRule ^(.*)$ index\.php?$1 [L]后前台能成功了~~但是我在 c 层 建立了一个 后台文件夹~后台的还是不能正常啊·~~~~
郁闷中
发表于 2009-8-13 16:24:29 | 显示全部楼层
htaccess文件要放在网站目录下,用CI默认是与system同级的目录,就是index.php的那个目录,放在c层没用
发表于 2009-8-13 17:16:25 | 显示全部楼层
代码有问题,
我给你贴正常的.

<IfModule mod_rewrite.c>
  <Files ~ "^.(htaccess|htpasswd)$">
  deny from all
  </Files>
  Options -Indexes
  Options +FollowSymLinks
  Options +Includes
  DirectoryIndex index.php
  order deny,allow
  RewriteEngine on
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteCond $1 !^index.php
  RewriteRule ^(.*)$ index.php?$1 [L]
</IfModule>
 楼主| 发表于 2009-8-13 23:35:22 | 显示全部楼层
谢谢了~~问题解决了

本版积分规则