【发布时间】:2017-11-15 14:11:36
【问题描述】:
我有一个网站(比如说 website.com)并使用 .htaccess 并包含以下内容:
ErrorDocument 403 /index.php
Options -Indexes
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ index.php [NC,L]
我需要将 http 重定向到 https。为此,我在我的虚拟主机设置中添加了这一行:
Redirect permanent / https://website.com/
因此,它将所有流量重定向到 https
我的问题是我需要为我的重定向添加例外 例如。此路由http://website.com/folder/test/* 之后的所有流量都应路由到 HTTP
请帮忙 谢谢
【问题讨论】:
-
Stackoverflow 也有类似的问题。 Refer this link
标签: php apache .htaccess ssl redirect