繁体   English   中英

使用 WordPress 保护 URL 返回 ERR_TOO_MANY_REDIRECTS

[英]Secure URL is return ERR_TOO_MANY_REDIRECTS with WordPress

为什么用 WordPress 保护 URL 返回 ERR_TOO_MANY_REDIRECTS?

  • 如果我使用单个 index.php 那么 https 正在工作。
  • 如果我在 WP_HOME = https 的同一目录中添加 wordpress 项目,则它返回ERR_TOO_MANY_REDIRECTS
  • 如果我在 WP_HOME = http 的同一目录中添加 wordpress 项目,那么它正在工作,但控制台返回This request has been blocked; the content must be served over HTTPS using httpd This request has been blocked; the content must be served over HTTPS using httpd ,并且无法正常显示。

htaccess 文件:


# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

# END WordPress

为 wordpress 子目录文件夹添加.htaccess文件。

<IfModule mod_rewrite.c>
RewriteEngine on
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{HTTPS} !=on
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
RewriteRule ^(/)?$ index.php [L] 
</IfModule>

暂无
暂无

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

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