0
在我的網站我有一個/upload
目錄。我不希望別人看到的目錄內容(在它的文件仍然可以觀看)的列表 - 所以我下面的錯誤消息是不是一個錯誤。禁用「不能成爲目錄」的錯誤
有沒有一種方法來禁用以下錯誤消息,同時保持/upload
目錄列表禁用/禁止?
[autoindex:error] [pid 17883] [client IP:16603] AH01276: Cannot serve directory /var/www/my-site.com/upload/: No matching DirectoryIndex (index.html,index.cgi,index.pl,index.php,index.xhtml,index.htm) found, and server-generated directory index forbidden by Options directive
我不希望它是在我的error.log中,因爲我不認爲這是一個錯誤。
我想我可以在目錄中創建自己的「Forbidden」index.html
文件,但是這個問題是針對多個文件夾的,所以我寧願不要(如果可能的話)。
感謝這個工作! '^重寫規則上傳/ - [F]' – JemoeE
編輯:'重寫規則^上傳/ $ - [F]' – JemoeE