gpt4 book ai didi

wordpress - 从 wordpress htaccess 重定向到 http 到 https

转载 作者:太空宇宙 更新时间:2023-11-03 14:30:24 25 4
gpt4 key购买 nike

这是我的 wordpress htaccess 文件代码。激活 ssl 证书后,现在我想将 http 重定向到 https。但它不起作用。什么是 .well-known/acheme-challenge?这个文件夹存在于我的根文件夹中。任何人都可以帮帮我

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} !^/\.well-known/acme-challenge/[0-9a-zA-Z_-]+$
RewriteCond %{REQUEST_URI} !^/\.well-known/cpanel-dcv/[0-9a-zA-Z_-]+$
RewriteCond %{REQUEST_URI} !
^/\.well-known/pki-validation/[A-F0-9] {32}\.txt(?:\ Comodo\ DCV)?$
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !^/\.well-known/acme-challenge/[0-9a-zA-Z_-]+$
RewriteCond %{REQUEST_URI} !^/\.well-known/cpanel-dcv/[0-9a-zA-Z_-]+$
RewriteCond %{REQUEST_URI} !
^/\.well-known/pki-validation/[A-F0-9] {32}\.txt(?:\ Comodo\ DCV)?$
RewriteRule . /index.php [L]`enter code here`

# 结束 WordPress

最佳答案

试试这个

RewriteEngine On 
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.example.com/$1 [R,L]

请引用https://serverguy.com/servers/redirect-http-to-https/

关于wordpress - 从 wordpress htaccess 重定向到 http 到 https,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53201051/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com