0

我在 TSO 主机上有一个 Perch Runway 网站,但在设置 https:// 重定向时遇到问题

我尝试过的大多数都导致重定向到错误页面

这是我目前的 htaccess

<IfModule mod_rewrite.c>
# Perch Runway
    RewriteEngine On
    RewriteCond %{HTTP:X-Forwarded-Proto} !https
    RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
    RewriteCond %{REQUEST_URI} !^/perch
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule .* /perch/core/runway/start.php [L]
</IfModule>

但这适用于除主页之外的所有页面,我被发送到 /core/runway/start.php

4

1 回答 1

0

我使用不同的 https 重定向,值得一试:

<IfModule mod_rewrite.c>
  # Perch Runway
  RewriteEngine On
  RewriteCond %{HTTPS} off
  RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R]
  RewriteCond %{REQUEST_URI} !^/perch
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteRule .* /perch/core/runway/start.php [L]
</IfModule>
于 2017-02-15T12:47:27.967 回答