将aspx文件重定向到所有参数的同一页面

时间:2012-08-09 09:11:06

标签: asp.net url-rewriting web-config

将所有这些请求发送到单个新页面的最简单,最简单的方法是什么?请将其命名为www.mydomain.com/page.html。提前谢谢。

使用asp.net / web.config / url重写

我试过了......但它没有用。

<rule name="nav rule" >
  <match url="^Nav\.aspx\/Page$" />
  <action type="Redirect" redirectType="Permanent" url="http://www.realestate-bigbear.com/featured-listings.html" />
</rule>
http://www.realestate-bigbear.com/Nav.aspx/Page=%2FListNow%2FDefault.aspx%2FPageID%3D104742
http://www.realestate-bigbear.com/Nav.aspx/Page=%2FListNow%2FProperty.aspx%3FPrint%3D1%26PropertyID%3D1968245%26%3D%26
http://www.realestate-bigbear.com/Nav.aspx/Page=%2FListNow%2FProperty.aspx%3FPrint%3D1%26PropertyID%3D2125546%26%3D%26
http://www.realestate-bigbear.com/Nav.aspx/Page=%2FListNow%2FProperty.aspx%3FPrint%3D1%26PropertyID%3D2125559%26%3D%26%3D%26
http://www.realestate-bigbear.com/Nav.aspx/Page=%2FListNow%2FProperty.aspx%3FPrint%3D1%26PropertyID%3D2125562%26%3D%26
http://www.realestate-bigbear.com/Nav.aspx/Page=%2FListNow%2FProperty.aspx%3FPrint%3D1%26PropertyID%3D2125563%26%3D%26%3D%26
http://www.realestate-bigbear.com/Nav.aspx/Page=%2FListNow%2FProperty.aspx%3FPrint%3D1%26PropertyID%3D2133142%26%3D%26
http://www.realestate-bigbear.com/Nav.aspx/Page=%2FListNow%2FProperty.aspx%3FPrint%3D1%26PropertyID%3D2148897%26%3D%26
http://www.realestate-bigbear.com/Nav.aspx/Page=%2FListNow%2FProperty.aspx%3FPrint%3D1%26PropertyID%3D2164928%26%3D%26
http://www.realestate-bigbear.com/Nav.aspx/Page=%2FListNow%2FProperty.aspx%3FPrint%3D1%26PropertyID%3D2167997%26%3D%26%3D%26
http://www.realestate-bigbear.com/Nav.aspx/Page=%2FListNow%2FProperty.aspx%3FPrint%3D1%26PropertyID%3D2205618%26%3D%26
http://www.realestate-bigbear.com/Nav.aspx/Page=%2FListNow%2FProperty.aspx%3FPropertyID%3D2015534%26
http://www.realestate-bigbear.com/Nav.aspx/Page=%2FListNow%2FProperty.aspx%3FPropertyID%3D2158616%26%3D,,%26%3D%26
http://www.realestate-bigbear.com/Nav.aspx/Page=%2FListNow%2FProperty.aspx%3FPropertyID%3D2164928%26%3D,,,,,%26%3D%26
http://www.realestate-bigbear.com/Nav.aspx/Page=%2FListNow%2FProperty.aspx%3FPropertyID%3D2176853%26%3D,,%26%3D%26
http://www.realestate-bigbear.com/Nav.aspx/Page=%2FListNow%2FProperty.aspx%3FPropertyID%3D2205618%26%3D%26%3D%26
http://www.realestate-bigbear.com/Nav.aspx/Page=%2FListNow%2FProperty.aspx%3FPropertyID%3D2210074%26%3D%26
http://www.realestate-bigbear.com/Nav.aspx/Page=%2FListNow%2FProperty.aspx%3FPropertyID%3D2212548%26%3D%26
http://www.realestate-bigbear.com/Nav.aspx/Page=/ListNow/Default.aspx

1 个答案:

答案 0 :(得分:0)

我认为您可以使用Url Rewriting library来减少大量代码。