You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

开启WordPress默认.htaccess重写规则后跳转至AlmaLinux默认页面的问题求助

开启WordPress默认.htaccess重写规则后跳转至AlmaLinux默认页面的问题求助

各位大佬,实在需要帮我看看这个棘手的问题!经过反复测试,我确定这是和WordPress配置相关的问题。

情况是这样的:我在HTTPS配置文件里添加了AllowOverride FileInfo,让服务器处理.htaccess的重写规则后,我的所有WordPress站点居然都跳转到了AlmaLinux的默认页面,提示根URL没有默认索引页。但如果我不开启这个配置,站点倒是能正常运行,可我又必须依赖.htaccess的功能啊!

有没有人能帮我捋清楚这到底是哪里出问题了?

下面是WordPress自动生成的.htaccess文件——只要我取消注释AllowOverride FileInfo,这个文件开始生效后,WordPress就直接崩了,所有请求都被跳转到AlmaLinux默认页面:

# BEGIN WordPress
# The directives (lines) between "BEGIN WordPress" and "END WordPress" are
# dynamically generated, and should only be modified via WordPress filters.
# Any changes to the directives between these markers will be overwritten.
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress

提前感谢各位能帮我走出这个困境!

备注:内容来源于stack exchange,提问作者J O

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.04.23 11:24:10