我有一個.htaccess文件沒有被Apache讀取的問題。我在本地機器上使用它,端口81.我使用Windows 10..htaccess沒有在本地主機上讀取xampp
我在我的.php文件的根目錄下創建了一個.htaccess文件。 當我在.htaccess文件裏面輸入垃圾時,什麼都沒有發生(網站正常加載)。我檢查了很多教程,線程並且無法找到可行的解決方案。
我迄今所做的:
-
.htaccess文件中檢查或500錯誤
- 沒有輸入任何信息(沒有工作)
- 經過httpd.conf文件的
AllowOverride All
(用於目錄還有) - 重新安裝了XAMPP
這是我在httpd.conf中設置什麼樣子現在:
#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# AllowOverride FileInfo AuthConfig Limit
#
AllowOverride All
#
# Controls who can get stuff from this server.
#
<Directory />
AllowOverride All
# Require all denied
</Directory>
我不知道下一步該做什麼。有任何想法嗎?
你的'根目錄'也是公共根嗎? – vonUbisch
你確定apache正在尋找'.htaccess'而不是'htaccess.txt'嗎? – bassxzero
該文件沒有名稱,類型中顯示HTACCESS文件。 至於根目錄是公共根目錄,我該如何檢查? – davidb