且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

.htaccess“此处不允许使用选项";

更新时间:2023-11-09 20:28:22

请注意,这是XAMPP特定的问题. XAMPP加载位于XAMPP/etc/extra/中的一些其他配置文件,这些文件将覆盖httpd.conf.对我来说,有问题的文件是http-userdir.conf,它适用于〜user请求的规则,并且包含行AllowOverride FileInfo AuthConfig Limit Indexes并将该行更改为AllowOverride All确实确实解决了我的问题.

Note that this is a XAMPP-specific issue. XAMPP loads some additional configuration files located in XAMPP/etc/extra/ that override httpd.conf. For me the offending file is http-userdir.conf which applies rules for ~user requests and contains the line AllowOverride FileInfo AuthConfig Limit Indexes and changing that line to AllowOverride All did indeed solve my issue.

这仅适用于从OS X上的/Sites/目录提供的文件.我不知道Windows版本是否完全使用UserDir甚至有类似的规则.

This only applies to files served from your /Sites/ directory on OS X. I don't know if the Windows version uses UserDir at all or even has a similar rule.