index.php文件出现500错误
我发现了一个与此非常相似的问题 ,我认为这可以解决我的问题。
但是,在更改我的.htaccess文件后,在列表末尾使用index.php,然后将index.php作为唯一条目,我仍然无法获得index.php来显示。 每隔一页工作正常,但我不知道如何解决这个问题。 谢谢。
如果出现500错误,您将始终要检查日志:
tail -f /var/log/apache2/error.log`
您评论说错误日志表明:
PHP解析错误:语法错误,第1行/var/www/index.php中的意外“版本”(T_STRING)
这表明index.php
本身的内容可能就是问题所在。 检查第1行是否有某种引用问题(错误的引号数?)或者可能是;
被排除在最后。
我认为.htaccess文件可能有任何错误
以下资源可以帮助您解决问题
- https://stackoverflow.com/questions/11540310/internal-error-500-with-htaccess-file
- https://stackoverflow.com/questions/6348999/confounding-htaccess-errors-leading-to-error-code-500
- https://stackoverflow.com/questions/1219135/mod-rewrite-for-clean-urls-gives-500-internal-server-error
- https://stackoverflow.com/questions/12232907/htaccess-gives-500-error-on-localhost
- http://wordpress.org/support/topic/500-internal-server-error-after-editing-indexphp-file
- http://wordpress.org/support/topic/500-error-after-editing-permalink-options-help
编辑:我想你也检查一下@Lars Rohrbach评论
tail -f /var/log/apache2/error.log