【问题标题】:Website redirecting to other website when opened with https使用 https 打开时网站重定向到其他网站
【发布时间】:2018-08-13 02:08:57
【问题描述】:

当我没有使用https 打开时,我的网站正在重定向到其他网站。可能是什么问题?

【问题讨论】:

  • 检查 htacess 文件或托管网站的服务器中给出的重定向属性。
  • @Shruti 如果我的回答解决了您的问题,请接受。而且,如果不让我知道出了什么问题。谢谢!

标签: dns cross-domain http-redirect


【解决方案1】:

适用于 Linux cPanel

如果您是网站的管理员,请登录并修改位于根目录中的 .htaccess 文件

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

Refer here

【讨论】:

    猜你喜欢
    • 2020-05-21
    • 2017-04-30
    • 2018-08-05
    • 1970-01-01
    • 1970-01-01
    • 2019-10-20
    • 2016-10-06
    • 2016-06-21
    • 2017-02-06
    相关资源
    最近更新 更多