Url Rewrite not working in Umbraco 4.7 & local IIS 7.5
Not having any luck getting the builtin url rewriting to work, as in the product page is not redirected or rewritten. Here's is my current setup with a local `redesign.website.local` website. Any pointers?
It might be that you need to enable wildcard mapping for the isapi .net assembly. I had the same problem a while back in IIS 6 and it was just a case of doing that.
Go into Mappings and add the path c:\windows\microsoft.net\framework\v4.0.30319\aspnet_isapi.dll, and make sure that the tickbox for 'Verify that the file exists' is turned off. That should sort it out :)
Thanks Tony! I was unable to get the URL Rewriting to work on a default install of IIS 7 so I instead went with URL Routing based roughly on http://weblogs.asp.net/scottgu/archive/2009/10/13/url-routing-with-asp-net-4-web-forms-vs-2010-and-net-4-0-series.aspx . The way that works is you set up a virtual route and redirect out to a page and instead of using the querystring for your vars you use the route data values. In 4.0 the custom http route handlers are no longer needed. the only downside of this approach is that you have to create an actual aspx page to handle the request, which meant recreating the page outside of the CMS and adding the macros into the page dynamically. If there is a better approach on IIS 7 I'd be happy to try for either approaches.
Url Rewrite not working in Umbraco 4.7 & local IIS 7.5
Not having any luck getting the builtin url rewriting to work, as in the product page is not redirected or rewritten. Here's is my current setup with a local `redesign.website.local` website. Any pointers?
1. change - <add key="umbracoUseDirectoryUrls" value="true" />
2. confirm - <modules runAllManagedModulesForAllRequests="true">
3. add attribute preCondition - <add name="UrlRewriteModule" type="UrlRewritingNet.Web.UrlRewriteModule,
UrlRewritingNet.UrlRewriter" preCondition="" />
4. updated config/UrlRewriting.config -
<urlrewritingnet rewriteOnlyVirtualUrls="true"
contextItemsPrefix="QueryString"
defaultPage = "default.aspx"
defaultProvider="RegEx"
xmlns="http://www.urlrewriting.net/schemas/config/2006/07">
<rewrites>
<add name="ProductPageRewrite"
virtualUrl="^~/product/d/(.*).aspx"
rewriteUrlParameter="ExcludeFromClientQueryString"
destinationUrl="~/products/detail.aspx?id=$1"
ignoreCase="true" />
</rewrites>
</urlrewritingnet>
Any suggestions?
Hi mate,
It might be that you need to enable wildcard mapping for the isapi .net assembly. I had the same problem a while back in IIS 6 and it was just a case of doing that.
Go into Mappings and add the path c:\windows\microsoft.net\framework\v4.0.30319\aspnet_isapi.dll, and make sure that the tickbox for 'Verify that the file exists' is turned off. That should sort it out :)
Let me know how you get on,
Cheers,
Tony
Thanks Tony! I was unable to get the URL Rewriting to work on a default install of IIS 7 so I instead went with URL Routing based roughly on http://weblogs.asp.net/scottgu/archive/2009/10/13/url-routing-with-asp-net-4-web-forms-vs-2010-and-net-4-0-series.aspx . The way that works is you set up a virtual route and redirect out to a page and instead of using the querystring for your vars you use the route data values. In 4.0 the custom http route handlers are no longer needed. the only downside of this approach is that you have to create an actual aspx page to handle the request, which meant recreating the page outside of the CMS and adding the macros into the page dynamically. If there is a better approach on IIS 7 I'd be happy to try for either approaches.
Hi,
as you set umbracoUseDirectoryUrls to true I guess you don't need the .aspx extension in the virtualUrl and destinationUrl of the rewrite rule.
Rgds
David
is working on a reply...