wxf5215215 发表于 2017-9-5 14:37:43

如何将https不带www的域名 301重定向到 https://www 主域名上去

本帖最后由 wxf5215215 于 2017-9-5 14:58 编辑

如何将https不带www的域名 301重定向到https://www 主域名上去


访问: https://123.com访问这个没加WWW的https 的时候
自动不会跳转到 带https://www 上



这个301重定向 需要怎么设置了?


求大师指点... ... ...
坐等

wxf5215215 发表于 2017-9-5 14:56:04

如何将https不带www的域名 301重定向到https://www 主域名上去

xinpic 发表于 2017-9-5 15:54:49

后台 301设置啊

wxf5215215 发表于 2017-9-5 15:58:38

OK了
后台设置 有用 还在这里喊

rsxz 发表于 2018-3-19 21:59:46

wxf5215215 发表于 2017-9-5 15:58
OK了
后台设置 有用 还在这里喊

你怎么设置的能否告知一下啊 我也遇到这个问题了

dewfn 发表于 2018-3-20 01:55:41

本帖最后由 dewfn 于 2018-3-20 02:02 编辑

<font style="vertical-align: inherit;"><font style="vertical-align: inherit;">IIS7 / 8</font></font><rule name =“目录结尾自动加斜杠”stopProcessing =“true”>
                  <match url =“^(。*)$”ignoreCase =“false”/>
                  <conditions logicalGrouping =“MatchAll”>
                        <add input =“ {REQUEST_FILENAME}“matchType =”IsFile“ignoreCase =”false“negate =”true“/>
                        <add input =”{URL}“pattern =”(。*)/ $“ignoreCase =”false“negate =”true“ />
                  </ conditions>
                  <action type =“Redirect”url =“{R:1} /”redirectType =“永久”/>
                </ rule>
                              <rule name =“HTTP跳转到HTTPS”enabled =“true”stopProcessing =“true”>
                                        <match url =“(。*)”/>
                                        <条件>
                        <add input =“{HTTP_HOST}”pattern =“^(localhost)”negate =“true”/>
                        <add input =“{HTTPS}”pattern =“^ OFF $”/>
                                        </ conditions>
                                        < action type =“Redirect”url =“https:// {HTTP_HOST} {R:1}”redirectType =“永久”/>
                              </ rule>
如果顶级域名要跳转到二级域名(比如不带www的跳转到带www)且目录一一对应用顶级域名建一个新站并绑定如果开启了ssl记得把https的顶级域名一起绑定了
然后用以下规则即可实现跳转。
<httpRedirect enabled =“true”destination =“https://www.你的域名.com$S$Q”exactDestination =“true”httpResponseStatus =“Permanent”/>      
或者手动添加

wuweigang 发表于 2023-5-11 23:11:12

mimisucai.com跳转https://www.mimisucai.com/

1500033514uiky 发表于 2023-6-15 12:37:07

是不是IIS环境?需要web.config或者(URL重写)就行了。
web.config = URL重写

其他地方不要设置301,特别IIS管理器设置https://www.***.com$S$Q不要去设置
页: [1]
查看完整版本: 如何将https不带www的域名 301重定向到 https://www 主域名上去