我的网站托管于GoDaddy。我想利用浏览器缓存,所以我添加了一个htaccess
文件。当向网站添加.htaccess 500服务器时出错
当我这样做时,我的网站返回500错误。我删除了htaccess
文件,我的网站恢复正常。我错过了什么?这里是我的htaccess
文件:
//Custom 404 errors
ErrorDocument 404 404.php
//Change default directory page
DirectoryIndex index.php
//Prevent viewing of .htaccess file
<Files .htaccess>
order allow,deny
deny from all
</Files>
//Prevent directory listings
Options All -Indexes
在此先感谢
可以显示服务器日志中的错误消息吗? – Gavriel
如上所述,检查你的日志(总是!!当处理500错误时),但我在这里看到的可疑是使用'404.php'而不是'/ 404.php'。我认为'ErrorDocument'预计以/ –
开头的网络路径我去了GoDaddy,并且打开错误日志的功能不存在,因为我的客户端没有为该功能付费。噢。感谢您的帮助 – BoundForGlory