IIS7 URL重写以基于路径进行重定向 [英] IIS7 URL Rewrite to redirect based on path

查看:208
本文介绍了IIS7 URL重写以基于路径进行重定向的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用IIS 7.5和URL Rewrite 2.0,我将如何重定向以下内容:

Using IIS 7.5 and URL Rewrite 2.0, how would I redirect the following:

https://main.mysite.com/help/2012/v1.2.3

https://help.mysite.com/2012/v1.2.3

寻求帮助的道路并不总是2012年,而可能是任何一年.与v1.2.3相同;这是一个版本号,因此它将更改.

And the part of the path after help will not always be 2012, it could be any recent year. Same with the v1.2.3; it's a version number so it will change.

谢谢.

推荐答案

这是一个非常常见的场景-这是一篇很棒的文章,其中包含许多图片,将帮助您指导创建用于在IIS 7.5中重写的地图的过程.

This is a pretty common scenerio - here is a great article with lots of pictures that will help guide you through the process of creating a map for rewriting in IIS 7.5.

http: //www.iis.net/learn/extensions/url-rewrite-module/using-rewrite-maps-in-url-rewrite-module

您的其他选项是HttpHandler(模块)或使用UrlRewriting框架(如MVC).

Your other options are a HttpHandler (module) or using a UrlRewriting framework (like MVC).

希望有帮助.

这篇关于IIS7 URL重写以基于路径进行重定向的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆