【问题标题】:How to redirect selected pages from HTTP to HTTPS如何将所选页面从 HTTP 重定向到 HTTPS
【发布时间】:2015-01-16 13:34:19
【问题描述】:

我想将我网站上的一些页面从http 重定向到https。 那些被选中的页面都包含一个关键字,例如“purchase

http://domain.com/producta-purchase >https...

http://domain.com/productb-purchase >https...

.htaccess怎么办?

【问题讨论】:

标签: .htaccess redirect ssl https


【解决方案1】:

您可以在 .htaccess 中使用它:

RewriteCond %{HTTPS} off
RewriteCond %{REQUEST_URI} purchase [NC]
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,NE,L]

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2017-01-31
    • 2013-10-18
    • 2018-03-19
    • 2014-03-19
    • 1970-01-01
    • 1970-01-01
    • 2016-12-12
    • 1970-01-01
    相关资源
    最近更新 更多