【发布时间】:2019-09-15 20:16:05
【问题描述】:
我需要在一系列网址上推迟 https...
现在我得到了这个: https://sub.domain.com/release/download/{id}
我需要将所有 /release/download/{id} url 重定向到 http
我从这里尝试了几种解决方案: Mod_rewrite http->https redirect EXCEPT one URL
但没有任何效果。
我在我的 apache conf 中得到了这个:
RewriteEngine On
RewriteCond %{SERVER_PORT} !^443$
RewriteRule ^(.*)$ https://%{HTTP_HOST}$1 [R=301,L]
【问题讨论】:
-
IMO 这是一种不好的做法。如果可能,应始终确保连接安全,尤其是当您拥有 HTTPS 证书时。
标签: apache .htaccess https apache2