0
我知道還有很多類似於這個問題的其他問題,我嘗試followinf其中的一些,但沒有運氣。使用.htaccess從網址中刪除文件夾
我有一個名爲test.com的網站,我需要當有人爲test.com顯示內容而在test.com中顯示內容時沒有在家裏。此刻
我htaccess文件是這樣的:
RewriteEngine on
RewriteBase/
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule /(.*) home/$1 [L]
RewriteRule /home/(.*) /$1 [L,R=302]
RewriteOptions inherit
RewriteCond %{HTTP_HOST} ^test\.com$ [OR]
RewriteCond %{HTTP_HOST} ^www\.test\.com$
但是當我鍵入test.com它顯示文件夾列表,裏面沒有回家的內容。
我在做什麼錯了?
感謝
此htaccess位於何處? – anubhava
我使用的是cPanel,它位於public_html文件夾中 – Nick