【问题标题】:How to redirect drupal 8.3.2 https to http如何将 drupal 8.3.2 https 重定向到 http
【发布时间】:2017-06-02 05:33:26
【问题描述】:

在 drupal 8.3.2 中将 https 重定向到 http 时需要帮助

# Turn off all options we don't need.
Options -Indexes -ExecCGI -Includes -MultiViews

# Set the catch-all handler to prevent scripts from being executed.
SetHandler Drupal_Security_Do_Not_Remove_See_SA_2006_006
<Files *>
  # Override the handler again if we're run later in the evaluation list.
  SetHandler Drupal_Security_Do_Not_Remove_See_SA_2013_003
</Files>

# If we know how to do it safely, disable the PHP engine entirely.
<IfModule mod_php5.c>

php_flag engine off

</IfModule>

那我该如何重定向

【问题讨论】:

  • 您好,欢迎来到 stackoverflow。请参阅stackoverflow.com/help/how-to-ask 了解如何提出正确的问题。此外,您应该添加您已经尝试过的代码(据我所知,您的代码中根本没有重定向命令)。
  • 我通过创建 $base_url 并尝试 301 重定向来尝试两种方式,一种是在 settings.php 中,但它不起作用
  • 第二种方式是 $conf 方式,它不起作用,所以我恢复了默认的告诉代码

标签: php drupal-8


【解决方案1】:

使用.htaccess generator 这将帮助您创建新的 .htaccess 文件,并且可以按照您的需要工作。

【讨论】:

  • 生成器没有 HTTPS 引用,因此无法解决此问题。
猜你喜欢
  • 2015-04-23
  • 2010-09-05
  • 1970-01-01
  • 2014-06-11
  • 1970-01-01
  • 1970-01-01
  • 2014-10-10
  • 1970-01-01
相关资源
最近更新 更多