网址无法正常工作与浏览器比铬等,htaccess文件错误 [英] url not working with browser other than chrome, htaccess file error
问题描述
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond $1 !^(index\.php|js|css|images|robots\.txt)
RewriteRule ^(.*)$ index.php/$1 [L]
我写了这个.htaccess文件,当我访问本地主机/ myProject的/家庭
在Chrome浏览器能正常工作,但在其他浏览器中显示未找到页面错误
I have written this .htaccess file when I access localhost/myProject/home
in Chrome this works fine but in other browsers it show page not found error
推荐答案
很可能需要选项+了FollowSymLinks
。以及为codeigniter点击链接,下载的zip在David Connelly的网站更多的htaccess。他们有不同的人约5,你可以尝试在拉链,毫无疑问,他们中的一个将工作。 http://www.insiderclub.org/downloads
Most likely you need Options +FollowSymLinks
. And for more htaccess for codeigniter click on link and download zip At David Connelly's Website. They have about 5 different ones that you could try in zip, no doubt one of them will work. http://www.insiderclub.org/downloads
我使用的下面工作正常,在所有浏览器为codeigniter。确保当你使用这个或任何其他htaccess的,你把你的域基础URL在配置/ config.php文件,然后从配置/ config.php文件
The one I use below works fine in all browsers for codeigniter. Make sure when you use this or any other htaccess, that you place your domain in base url at config/config.php and then remove the index.php from config/config.php
Options +FollowSymLinks
Options -Indexes
DirectoryIndex index.php
RewriteEngine on
RewriteCond $1 !^(index\.php|images|robots\.txt)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L,QSA]
这篇关于网址无法正常工作与浏览器比铬等,htaccess文件错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!