views:

853

answers:

9

I've looked at several URL rewriters for ASP.Net and IIS and was wondering what everyone else uses, and why.

Here are the ones that I have used or looked at:

  • ThunderMain URLRewriter: used in a previous project, didn't quite have the flexibility/performance we were looking for
  • Ewal UrlMapper: used in a current project, but source seems to be abandoned
  • UrlRewritingNet.UrlRewrite: seems like a decent library but documentation's poor grammar leaves me feeling uneasy
  • UrlRewriter.NET: this is my current fav, has great flexibility, although the extra functions pumped into the replacement regexs changes the standard .Net regex syntax a bit
  • Managed Fusion URL Rewriter: I found this one in a previous question on stack overflow, but haven't tried it out yet, from the example syntax, it doesn't seem to be editable via web.config
+4  A: 

If I were starting a new web project now I'd be looking at using MVC from scratch. That uses re-written URLs as standard.

Keith
+7  A: 

There's System.Web.Routing that was just released with .NET 3.5.

You can just use Request.RewritePath() in a custom HttpModule

I prefer using an IHttpHandlerFactory implementation and have full control over all incoming URLs and where they're mapped to.

Mark Cidade
+2  A: 

I've used UrlRewriting.NET before on a very high-traffic site - it worked great for us. I believe the developers are German, so the English documentation is probably not as good as it could be. I'd highly recommend it.

Jason
+2  A: 

I've had a good experience with Ionic's ISAPI Rewrite Filter which is very similar to ISAPI_Rewrite, except free. Both are modeled after mod_rewrite and are ISAPI filters, so you can't manage them in code as you have to set them up in IIS.

John Sheehan
+3  A: 

+1 UrlRewritingNET.URLRewrite -- used in several hundred services/portals/sites on a single box without issue for years! (@Jason -- that is the one you're talking about, right?)

and I've also used the URLRewriter.NET on a personal site, and found it, ah, interesting. @travis, you're right about the changed syntax, but once you get used to it, it's good.

Pat
AlfeG
Also hard coded section name "urlrewritingnet" was a big surprise T_T
AlfeG
Pat
+1  A: 

I just installed Helicon's ISAPI Rewrite 3. Works exactly like htaccess. I'm diggin it so far.

chrisofspades
+1  A: 

I used .NET URL Rewriter and Reverse Proxy with great success. It's almost on par with mod_rewrite and uses almost all of the same syntax's. The owner of the project is extremely helpful and friendly and the product works great. This gem provides both Rewriting and Proxy functionality, which many solutions don't offer. IMO, worth a look.

Dscoduc
+2  A: 

IIS 7 has an URL Rewrite Module that is fairly capable and integrates well with IIS.

notandy
+1 for being new skool! This is what I use. Be careful though if you're used to UrlRewritingNet.Rewrite, since Request.Url is now the actual page rather than the requested one. Now you need Request.RawUrl to get the url that was actually requested
BritishDeveloper
+2  A: 

I would not recommend UrlRewritingNet if you are in an IIS7 Windows 2008 environment.

Reason: UrlRewritingNet requires that you app pool mode = Classic and NOT integrated. This is not optimal Also, their project seems very dead that last 2 years.

aron