htaccess / custom 404页面 - 一切似乎都很好,但它不起作用(沮丧)

时间:2014-12-16 12:05:44

标签: php .htaccess

<Files ~ "^\.(htaccess|htpasswd)$">
    deny from all
</Files>
Options Indexes
ErrorDocument 404 new404.html 
order deny,allow    
  • 文件没有名称,只有扩展名.thaccess
  • 它位于带有索引页面的主域文件夹中。
  • 新的404页面名为new404.html,与htaccess文件位于同一文件夹中。

我在htaccess主题上用几个指南检查了代码,看起来没问题。

我将不胜感激。

1 个答案:

答案 0 :(得分:0)

你不能写一行

Options -Indexes
ErrorDocument 404 new404.html
<Files ~ "^\.(htaccess|htpasswd)$">
    deny from all 
</Files>