【发布时间】:2017-12-20 21:39:27
【问题描述】:
我在 public_html 主文件夹 (http://www.myexample.com) 中部署了一个使用 CodeIgniter 的网站。该项目在本地主机上完美运行。为了从 URL 中删除 index.php,它具有以下 .htaccess:
RewriteEngine on
RewriteCond $1 !^(index\.php|public|\.txt)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?$1
但是,当我尝试访问该网站时,我遇到了内部服务器错误:
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@its.org.pk 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 文件,但得到了相同的错误。
【问题讨论】:
-
您输入了有效的数据库用户名和密码吗?您还更改了配置文件
$config['base_url'] = 'http://example.com';中的基本网址,它位于application / config / config.php -
是的,我做了这个设置,但仍然出现这个错误。
标签: php .htaccess codeigniter internal-server-error