网址重写所需的帮助 [英] help required in url rewriting

查看:104
本文介绍了网址重写所需的帮助的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在URL重写中,我需要找到一种模式,例如www.xyz.com/abc/或www.xyz.com/abc或www.xyz.com/abc/default.htm,并将其重定向到default.aspx.

我尝试使用以下规则,但不适用于我

In URL Rewriting I need to find a pattern such as www.xyz.com/abc/ or www.xyz.com/abc or www.xyz.com/abc/default.htm and redirect them to default.aspx.

I tried with following rule but it''s not working for me

<modulesSection>
  <rewriteModule>
    <rewriteOn>true</rewriteOn>
    <rewriteRules>
<rule source="(.*)/(.*)/(.+)" destination="Default.aspx"/>
    </rewriteRules>
  </rewriteModule>
</modulesSection>

推荐答案

这可能对您有帮助...

使用ASP.NET进行URL重写 [ http://weblogs.asp. net/scottgu/archive/2007/02/26/tip-trick-url-rewriting-with-asp-net.aspx [ http://www.simple -talk.com/dotnet/asp.net/a-complete-url-rewriting-solution-for-asp.net-2.0/ [ http://dotnetguts.blogspot.in/2008/07/url-rewriting-with- urlrewriternet.html [ ^ ]
this may help you...

URL Rewriting with ASP.NET[^]
http://weblogs.asp.net/scottgu/archive/2007/02/26/tip-trick-url-rewriting-with-asp-net.aspx[^]
http://www.simple-talk.com/dotnet/asp.net/a-complete-url-rewriting-solution-for-asp.net-2.0/[^]
http://dotnetguts.blogspot.in/2008/07/url-rewriting-with-urlrewriternet.html[^]


这篇关于网址重写所需的帮助的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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