1
我有25個Url爲該urlrewritingnet DLL編寫的重寫URL。將urlrewritingnet轉換爲IIS 7.5 URL重寫規則
如何將其轉換爲IIS 7.5的Url Rewritting。
<urlrewritingnet rewriteOnlyVirtualUrls="true" contextItemsPrefix="QueryString" defaultPage="Page.aspx" defaultProvider="RegEx" xmlns="http://www.urlrewriting.net/schemas/config/2006/07">
<rewrites>
<add name="RewriteLogin" virtualUrl="^~/Login/" rewriteUrlParameter="ExcludeFromClientQueryString" destinationUrl="~/Login.aspx" ignoreCase="true"/>
<add name="RewriteMembership" virtualUrl="^~/Memberships.aspx" rewriteUrlParameter="ExcludeFromClientQueryString" destinationUrl="~/Memberships/Default.aspx" ignoreCase="true"/>
<add name="RewriteMembershipPage" virtualUrl="^~/Pages/Memberships.aspx" rewriteUrlParameter="ExcludeFromClientQueryString" destinationUrl="~/Memberships/Default.aspx" ignoreCase="true"/>
<add name="RewriteGalleryMainA" virtualUrl="^~/Pages/Gallery.aspx" rewriteUrlParameter="ExcludeFromClientQueryString" destinationUrl="~/Gallery/Default.aspx" ignoreCase="true"/>
<add name="RewriteDonation" virtualUrl="^~/Donations.aspx" rewriteUrlParameter="ExcludeFromClientQueryString" destinationUrl="~/Donations/Default.aspx" ignoreCase="true"/>
<add name="RewriteDonationPage" virtualUrl="^~/Pages/Donations.aspx" rewriteUrlParameter="ExcludeFromClientQueryString" destinationUrl="~/Donations/Default.aspx" ignoreCase="true"/>
<add name="RewriteShow" virtualUrl="^~/Show/(.*).aspx" rewriteUrlParameter="ExcludeFromClientQueryString" destinationUrl="~/ShowDetails.aspx?PageName=$1" ignoreCase="true"/>
<add name="RewriteEvent" virtualUrl="^~/Event/(.*).aspx" rewriteUrlParameter="ExcludeFromClientQueryString" destinationUrl="~/EventDetails.aspx?PageName=$1" ignoreCase="true"/>
<add name="RewriteShowTime" virtualUrl="^~/ShowTime/(.*).aspx" rewriteUrlParameter="ExcludeFromClientQueryString" destinationUrl="~/ShowTime.aspx?id=$1" ignoreCase="true"/>
<add name="RewriteProd" virtualUrl="^~/Product/(.*).aspx" rewriteUrlParameter="ExcludeFromClientQueryString" destinationUrl="~/ProductDetails.aspx?PageName=$1" ignoreCase="true"/>
<add name="RewriteNews" virtualUrl="^~/News/(.*).aspx" rewriteUrlParameter="ExcludeFromClientQueryString" destinationUrl="~/Article.aspx?PageName=$1" ignoreCase="true"/>
<add name="RewritePage1" virtualUrl="^~/Pages/(.*).aspx" rewriteUrlParameter="ExcludeFromClientQueryString" destinationUrl="~/Page.aspx?pageName=$1" ignoreCase="true"/>
<add name="RewriteArticle" virtualUrl="^~/Articles/(.*).aspx" rewriteUrlParameter="ExcludeFromClientQueryString" destinationUrl="~/Page.aspx?pageName=$1" ignoreCase="true"/>
<add name="RewriteVenue" virtualUrl="^~/Venue/(.*).aspx" rewriteUrlParameter="ExcludeFromClientQueryString" destinationUrl="~/Venue/Default.aspx?id=$1" ignoreCase="true"/>
<add name="RewriteEventTime" virtualUrl="^~/EventTime/(.*).aspx" rewriteUrlParameter="ExcludeFromClientQueryString" destinationUrl="~/EventTime.aspx?id=$1" ignoreCase="true"/>
<add name="RewriteShowTimeChart" virtualUrl="^~/ShowTimeChart/(.*).aspx" rewriteUrlParameter="ExcludeFromClientQueryString" destinationUrl="~/ShowTimeSeatingChart.aspx?showtime=$1" ignoreCase="true"/>
<add name="RewriteCategory" virtualUrl="^~/Category/(.*).aspx" rewriteUrlParameter="ExcludeFromClientQueryString" destinationUrl="~/ShowsPerCategory.aspx?Category=$1" ignoreCase="true"/>
<add name="RewriteShowTimeChart" virtualUrl="^~/ShowTimeChart/(.*).aspx" rewriteUrlParameter="ExcludeFromClientQueryString" destinationUrl="~/ShowTimeSeatingChart.aspx?showtime=$1" ignoreCase="true"/>
<add name="RewriteGalleryView" virtualUrl="^~/Gallery/(.*).aspx" rewriteUrlParameter="ExcludeFromClientQueryString" destinationUrl="~/Gallery/View.aspx?id=$1" ignoreCase="true"/>
<add name="RewriteGalleryMainB" virtualUrl="^~/Gallery.aspx" rewriteUrlParameter="ExcludeFromClientQueryString" destinationUrl="~/Gallery/Default.aspx" ignoreCase="true"/>
<add name="RewriteNewsCategory" virtualUrl="^~/News/Category/(.*).aspx" rewriteUrlParameter="ExcludeFromClientQueryString" destinationUrl="~/ArticlesPerCategory.aspx?Category=$1" ignoreCase="true"/>
<add name="RewriteBlogCategory" virtualUrl="^~/Blog/Category/(.*).aspx" rewriteUrlParameter="ExcludeFromClientQueryString" destinationUrl="~/ArticlesPerCategory.aspx?Category=$1" ignoreCase="true"/>
<add name="RewriteMobileShow" virtualUrl="^~/mobile/Show/(.*).aspx" rewriteUrlParameter="ExcludeFromClientQueryString" destinationUrl="~/mobile/ShowDetails.aspx?PageName=$1" ignoreCase="true"/>
<add name="RewriteMobileEvent" virtualUrl="^~/mobile/Event/(.*).aspx" rewriteUrlParameter="ExcludeFromClientQueryString" destinationUrl="~/mobile/ShowDetails.aspx?PageName=$1" ignoreCase="true"/>
<add name="RewriteMobileEventTime" virtualUrl="^~/mobile/EventTime/(.*).aspx" rewriteUrlParameter="ExcludeFromClientQueryString" destinationUrl="~/mobile/EventTime.aspx?id=$1" ignoreCase="true"/>
</rewrites>
</urlrewritingnet>
你找到了一個解決方案? – AmITheRWord 2011-10-12 11:21:35