Windows Server 2022
Apache 2.4.57 x64
httpd.conf - 相关
<Directory />
Options none
AllowOverride none
Require all denied
</Directory>
DirectoryIndex index.html
<Files ".ht*">
Require all denied
</Files>
httpd-vhosts.conf - 相关
<VirtualHost *:443>
DocumentRoot "c:/path/to/public_html"
DirectoryIndex index.php
<Directory "c:/path/to/public_html">
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
文件
c:/path/to/public_html/index.php
c:/path/to/public_html/.htaccess
.htaccess - 完整
RewriteEngine Off
然后https://www.example.com/服务RewriteEngine Off
_index.php
当https://www.example.com/导致 403-ForbiddenRewriteEngine On
时
我是否遗漏了一些明显的指令?
注意:即使明确请求https://www.example.com/index.php,上述行为也保持不变。