Click to See Complete Forum and Search --> : Rewriting URL address


bulgarian388
04-19-2007, 08:40 PM
Hi dudes, I was wondering if anyone knows a simple, easy, way to rewrite the URL of a page similar to the modrewrite in apache. I know there was a dll for .NET that supposedly did that, but I never managed to get it to work. For those confused I want to take this:

default.aspx?something=somethingElse

To This:

default/?something=somethingElse

lmf232s
04-20-2007, 10:16 AM
.net 2.0 has this built in

Check out this article
http://www.developer.com/net/asp/article.php/3581326

Google .net 2.0 URL Mapping and your get a bunch of hits.

bulgarian388
04-20-2007, 02:54 PM
Thanks for the article. I'm sure it would have worked had I not been on a shared hosting environment where the I have to enable some "Machine to Application" setting.

I'll keep it in mind for any time in the future that I have access to that.

bulgarian388
04-21-2007, 08:31 PM
Okay, well, got one more question. How do I get past this error:

It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level.

It pops up as soon as I add this to the web.config:

<urlMappings enabled="true" />