www/zj/
实现目标:
1、http 跳转到 https
2、www.a.com/zj/ 目录跳转 zj.a.com
实际代码:
写在 httpd.ini 里
RewriteCond Host: ([\d]+|zj)\.a\.com
RewriteRule ^(?!/images/)(?!/js/)(?!/css/)(.*) /$1$2 [I,L]
2、http转为https
在 web.config
<rules>
<rule name="HTTP to HTTPS redirect" stopProcessing="true">
<match url="(.*)" />
<conditions>
<add input="{HTTPS}" matchType="Pattern" pattern="^on$" ignoreCase="true" negate="true"/>
</conditions>
<action type="Redirect" url="https://{HTTP_HOST}/{R:1}" redirectType="Found" />
</rule>
</rules>
最后在浏览器输入 a.com 跳转到了 https://zj.a.com/zj/
问题描述:
1、https成功
2、怎么修改把后面的 /zj/不要