Web配置

编程入门 行业动态 更新时间:2024-10-18 00:29:28
本文介绍了Web配置-将具有域的特定URL重定向到另一个URL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我想将testdomain/diamonds/silver重定向到testdomain/diamonds.

I would like to redirect testdomain/diamonds/silver to testdomain/diamonds.

我需要指定域,因为该网站具有多个附加域.

I need to have the domain specified because the website has several domains attached to it.

这就是我现在所拥有的,但它似乎无能为力.

This is what i have now, but it does not seem to do anything.

<rule name="testredirect" stopProcessing="true"> <match url=".*" /> <conditions logicalGrouping="MatchAny"> <add input="{HTTP_HOST}" pattern="^testdomain/diamonds/silver" /> </conditions> <action type="Redirect" url="/diamonds" redirectType="Permanent" /> </rule>

我也尝试过这样做,但是那也不起作用.

I have also tried this, but that did not work either.

<rule name="testredirect" stopProcessing="true"> <match url="^testdomain/diamonds/silver" ignoreCase="true" /> <action type="Redirect" url="/diamonds" redirectType="Permanent"/> </rule>

有什么建议吗?

我知道了.在下面回答!

推荐答案

最后.

这有效:

<rule name="redirect diamonds" stopProcessing="true"> <match url="^diamonds/diamondrings" ignoreCase="true" /> <conditions> <add input="{HTTP_HOST}" pattern="^(www.)?mywebshop.azurewebsites" /> </conditions> <action type="Redirect" url="/diamondrings" redirectType="Permanent" /> </rule>

更多推荐

Web配置

本文发布于:2023-11-01 01:49:17,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1547894.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:Web

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!