【问题标题】:Redirect old https to http via htaccess within wordpress通过 wordpress 中的 htaccess 将旧的 https 重定向到 http
【发布时间】:2011-09-19 07:46:16
【问题描述】:

我刚刚使用 wordpress 为客户重建了一个旧网站。旧网站的所有页面都是 https://

我想将所有这些 https 页面重定向到 http 旧页面的格式如下:https://example.com/index.php?stm_a=23&m=279&r=98ab55fe446d960a&rid=98ab55fe446d960a,我必须将它们重定向到新的永久链接结构,例如: /关于/ /接触/ 等等

我尝试使用 info here 将所有流量从 https 重定向到 http 无济于事

我当前的 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 http redirect https


    【解决方案1】:

    RewriteEngine On之后,尝试添加以下内容:

    RewriteCond %{HTTPS} on
    RewriteRule (.*) http://%{HTTP_HOST}%{REQUEST_URI}
    

    【讨论】:

    • 谢谢你,拉维!现在,当我尝试在 https:// 中访问该站点的索引时,我被重定向到默认页面 /cgi-sys/defaultwebpage.cgi,其中显示如下内容:“如果您觉得您错误地访问了此页面,请联系网站所有者:等”
    • https (root) 应该重定向到 http (root)。 https 子页面应该重定向到 http 子页面。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2014-03-30
    • 2019-04-11
    • 1970-01-01
    • 2013-09-08
    • 2012-11-02
    • 1970-01-01
    相关资源
    最近更新 更多