301跳转问题,跪求各位大神路过看看~~

zgahxd 2019-12-13 11:33:38
网站添加了ssl证书,也是设置了不带www跳转到带WWW一切跳转都正常,

唯一的错误是www.a.net/article/6620.html会自动跳转到首页的https://ww.a.net这个要怎么解决呢??

IIS服务器在wepconfig里面是这样设置的。

<rule name="HTTP to HTTPS redirect" enabled="true" stopProcessing="true">
<match url=".*" />
<conditions logicalGrouping="MatchAll" trackAllCaptures="false">
<add input="{HTTPS}" pattern="off" />
</conditions>
<action type="Redirect" url="https://{HTTP_HOST}/{R:0}" />
</rule>
...全文
180 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
zgahxd 2020-07-26
  • 打赏
  • 举报
回复
<rule name="WordPress: https://www.shoufaw.com" patternSyntax="Wildcard"> <match url="*" /> <conditions> <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" /> <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" /> </conditions> <action type="Rewrite" url="https://www.zuixinyiqi.net" /> </rule>
zgahxd 2020-07-26
  • 打赏
  • 举报
回复
最后解决了,我用的是IIS只要在根目录web.config里面加上。 <rule name="WordPress: https://www.163dyw.net" patternSyntax="Wildcard"> <match url="*" /> <conditions> <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" /> <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" /> </conditions> <action type="Rewrite" url="index.php" /> </rule>
zgahxd 2019-12-13
  • 打赏
  • 举报
回复
我需要的是www.a.net/article/6620.html会自动跳转到的https://www.a.net/article/6620.html而不是直接到首页

现在如果在浏览器里直接输入www.a.net/article/6620.html就会直接跳转到https://www.a.net

4,251

社区成员

发帖
与我相关
我的任务
社区描述
国内外优秀PHP框架讨论学习
社区管理员
  • Framework
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧