CodeIgniter .htaccess - 500 内部服务器错误/index.php 删除 [英] CodeIgniter .htaccess - 500 Internal Server Error/ index.php remove
本文介绍了CodeIgniter .htaccess - 500 内部服务器错误/index.php 删除的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个这样的网站(子域)
rabbani.websolocom.xyz
我有这样的 .htaccess
代码(我使用了 Codeigniter):
RewriteEngine on重写基/拉巴尼RewriteCond $1 !^(index\.php|resources|robots\.txt)RewriteCond %{REQUEST_FILENAME} !-fRewriteCond %{REQUEST_FILENAME} !-D重写规则 ^(.*)$ index.php/$1 [L,QSA]
但是当我尝试访问我的网站时出现错误(500 内部服务器错误).我应该如何处理我的 .htaccess
文件?或者我目录中的任何其他文件有问题?
解决方案
使用这个
.htaccess
(外部应用程序文件夹)
RewriteEngine OnRewriteCond %{REQUEST_FILENAME} !-fRewriteCond %{REQUEST_FILENAME} !-d重写规则 ^(.*)$ index.php/$1 [L,QSA]
<块引用><块引用>
这是Codeigniter推荐的.htaccess
I have a website like this (sub-domain)
rabbani.websolocom.xyz
And I have the .htaccess
code like this (I used Codeigniter) :
RewriteEngine on
RewriteBase /rabbani
RewriteCond $1 !^(index\.php|resources|robots\.txt)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-D
RewriteRule ^(.*)$ index.php/$1 [L,QSA]
But when I try to access my website it goes error (500 Internal Server Error). What should i do with my .htaccess
file? Or any another file that wrong in my directory?
解决方案
Use this
.htaccess
(Outside application folder)
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L,QSA]
This is Codeigniter recommended
.htaccess
这篇关于CodeIgniter .htaccess - 500 内部服务器错误/index.php 删除的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文