简体   繁体   English

.htaccess无法在localhost xampp上读取

[英].htaccess not read on localhost xampp

I have a problem with a .htaccess file not being read by Apache. 我有一个问题,Apache没有读取.htaccess文件。 I'm using it on my local machine, port 81. I'm using Windows 10. 我在我的本地机器上使用它,端口81.我正在使用Windows 10。

I created a .htaccess file in the root directory of my .php files. 我在.php文件的根目录中创建了一个.htaccess文件。 When I enter some rubbish inside .htaccess file nothing happens (website loads normally). 当我在.htaccess文件中输入一些垃圾时,没有任何反应(网站正常加载)。 I've checked many tutorials, threads and was unable to find a viable solution. 我检查了许多教程,线程,但无法找到可行的解决方案。

What I have done so far: 到目前为止我做了什么:

  • Entered anything in the .htaccess file to check or the 500 error (didn't work) 输入.htaccess文件中的任何内容来检查或500错误(不起作用)
  • Checked the httpd.conf file for AllowOverride All (for directory as well) 检查httpd.conf文件中的AllowOverride All (对于目录也是如此)
  • Re-installed Xampp 重新安装Xampp

This is how my settings in httpd.conf look like now: 这就是我在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>

I've got no idea what to do next. 我不知道接下来该做什么。 Any ideas? 有任何想法吗?

Is this section in httpd.con like this, or is looking for any other file name? 这个部分在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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM