希望你是東好。關於使用.htaccess文件
我在我的public_html文件夾中有一個子文件夾。 在子文件夾中,我用下面的代碼.htaccess文件:
# Disable indexing:
Options All -Indexes
# Ignore every file:
IndexIgnore *
# Prevent access to any file:
<FilesMatch "^.*$">
Order Allow,Deny
Deny from all
</FilesMatch>
現在,當我瀏覽到子文件夾,例如,www.mysite.com/subfolder/myfile.php,I所示我的網站的index.html頁面! 這真的可以發生嗎?!
有人可以告訴我我需要做什麼來顯示一個通用的「訪問不被允許」頁面?
在此先感謝您的幫助。
您在網站的文檔根目錄中是否有_another_'.htaccess'文件?這個'.htaccess'似乎不成問題。 – lanzz
你是對的,剛剛在我的public_html文件夾(由Drupal創建)中找到另一個.htacess文件,它顯示了index.html頁面。 –