2016-08-23 101 views
1

我有一個.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> 

我不知道下一步該做什麼。有任何想法嗎?

+0

你的'根目錄'也是公共根嗎? – vonUbisch

+1

你確定apache正在尋找'.htaccess'而不是'htaccess.txt'嗎? – bassxzero

+0

該文件沒有名稱,類型中顯示HTACCESS文件。 至於根目錄是公共根目錄,我該如何檢查? – davidb

回答

0

httpd.con中的這一部分是這樣的,還是正在尋找任何其他文件名?

# 
# AccessFileName: The name of the file to look for in each directory 
# for additional configuration directives. See also the AllowOverride 
# directive. 
# 
AccessFileName .htaccess 
+0

是的,它看起來完全一樣。 我試過重命名這個和.htaccess文件,但沒有奏效。 – davidb

+0

這可能是Webmatrix(我正在使用的軟件)不支持.htaccess文件。 – davidb