簡體   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