我正在使用Adobe CQ 5.6并根据以下链接实施SSL配置。 http://docs.adobe.com/docs/en/cq/current/deploying/config-ssl.html 现在已配置SSL,但不支持特定的URI匹配。我希望任何网址以" abc.html"结尾。应该通过SSL打开。
喜欢:
http://localhost:5402/content/xyz/abc.html
应替换为https://localhost:5433/content/xyz/abc.html
现在有人可以告诉我上面的内容,属性的价值应该是什么" 吊带:匹配"
答案 0 :(得分:3)
以下映射应该可以解决问题:
/etc/map
+-- http
+-- localhost.5402
+-- abc
+-- sling:match = "(.*)/abc.html"
+-- sling:redirect = "https://localhost:5433/$1/abc.html"
+-- sling:status = "301"
localhost.5402
匹配主机名和端口。 abc
映射匹配具有/abc.html
后缀的所有请求,并使用HTTP状态代码301将其永久移动到https
域。
您也可以考虑使用Apache的 mod_rewrite 。适当的规则如下:
RewriteCond %{HTTP_HOST} =localhost
RewriteCond %{SERVER_PORT} =5402
RewriteRule ^/(.*)/abc.html$ https://localhost:5433/$1/abc.html [L,R=301]