Url Rewriting Using Regular Expressions

posted on 2004-12-01 at 23:51:05 by Joel Ross

This is a little old, but Fabrice modified Fritz Onion's HttpModule for URL rewriting to use regular expressions.

Then, in Fabrice's comments, someone mentioned the idea of writing the config settings to an XML file, which can be generated from a database. Now you get regular expression-enabled rewriting, and a database driven method to modify the rewriting. Now that's pretty cool.

We recently expanded our rewriting to look for certain patterns, and redirect to a standard page passing in certain parameters to determine what content should be on the page. We could have used this! The way we did it works just fine, and allows for adding pages to the site to be dynamic, which will be a nice feature our client will have when we go live, but this approach would probably have been an easier one to implement.

Categories: ASP.NET