尝试实时访问网站时出现内部错误



获取以下错误

Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator at webmaster@api.example.com.au to inform them of the time this error occurred, and the actions you performed just before this error.
More information about this error may be available in the server error log.
Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.

我推送了实时代码点火器项目,我更新了.htaccess、数据库文件、配置文件。

.htaccess文件包含以下代码

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond $1 !^(index.php|css|js|images|robots.txt)
RewriteRule ^(.*)$ index.php?$1 [L]
Options -Indexes

Codeigniter项目在api.websiteName.com文件夹中,它不在public_html中,如果我删除index.php和htaccess文件并上传"index.html"文件进行测试,那么index.html可以正常工作,但当我上传index.php和.htaccess文件时,它说内部服务器错误500,同一个问题有很多答案,我遵循答案并更新了.htacccess文件,但什么都不工作。文件夹权限设置为755,但仍出现相同错误。任何帮助都将不胜感激。

PHP verison高于5.6

您可以在代码中尝试这个.htaccess文件。

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule ^(.+)$ index.php?url=$1 [QSA,L]
<IfModule mod_headers.c>    
Header add Access-Control-Allow-Origin "*" 
</IfModule>
<IfModule mod_env.c>
SetEnv CI_ENV development
</IfModule>

我希望它能帮助你。。

相关内容

  • 没有找到相关文章

最新更新