index.php无法去掉
在本地我按照使用说明, 能够去掉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
</IfModule>
我在服务器测试过 :
RewriteRule eeee.html$ 2.php
这个能正常跳转
谁帮帮忙啊~~~~急啊 看起来好像没什么问题吧,不过我对 rewrite 规则不熟悉,呵呵 谢谢~~~
他不能正常跳转啊~~~不管点那个连接都还是在首页
我曾经把 RewriteRule ^(.*)$ index\.php?$1 后前台能成功了~~但是我在 c 层 建立了一个 后台文件夹~后台的还是不能正常啊·~~~~
郁闷中 htaccess文件要放在网站目录下,用CI默认是与system同级的目录,就是index.php的那个目录,放在c层没用 代码有问题,
我给你贴正常的.
<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
</IfModule> 谢谢了~~问题解决了
页:
[1]