So here is what ended up working for me. We already have Umbraco installed, and as part of Umbraco comes
http://www.urlrewriting.net/. That works fine with IIS6, but it didn't seem to handle postbacks well (the underlying URL would be revealed). So, I grabbed the Form.browser file described by
this post and placed it in my App_Browsers folder. I also modified the web.config as that post states and I put the "FormRewriter.vb" file from that post in my App_Code directory. Since I am using UrlRewriting.net rather than UrlRewriter.net, I'm sure some of the web.config settings were not necessary (e.g., I setup the rewrite rules according to the methods required by UrlRewriting.net rather than UrlRewriter.net). Here is an example of a rule I used:
<add name="MyTest" virtualUrl="^~/UserSeesThis/?$" destinationUrl="~/ThisIsABackendPage.aspx"
ignoreCase="true" rewrite="Application" redirectMode="Temporary" />
This was the content of the Form.browser file:
<browsers>
<browser refID="Default">
<controlAdapters>
<adapter controlType="System.Web.UI.HtmlControls.HtmlForm" adapterType="FormRewriterControlAdapter" />
</controlAdapters>
</browser>
</browsers>
The FormRewriter.vb file contained this code:
Imports Microsoft.VisualBasic
Public Class FormRewriterControlAdapter
Inherits System.Web.UI.Adapters.ControlAdapter
Protected Overrides Sub Render(ByVal writer As System.Web.UI.HtmlTextWriter)
MyBase.Render(New RewriteFormHtmlTextWriter(writer))
End Sub
End Class
Public Class RewriteFormHtmlTextWriter
Inherits HtmlTextWriter
Sub New(ByVal writer As HtmlTextWriter)
MyBase.New(writer)
Me.InnerWriter = writer.InnerWriter
End Sub
Sub New(ByVal writer As System.IO.TextWriter)
MyBase.New(writer)
MyBase.InnerWriter = writer
End Sub
Public Overrides Sub WriteAttribute(ByVal name As String, ByVal value As String, ByVal fEncode As Boolean)
If (name = "action") Then
Dim Context As HttpContext
Context = HttpContext.Current
If Context.Items("ActionAlreadyWritten") Is Nothing Then
value = Context.Request.RawUrl
Context.Items("ActionAlreadyWritten") = True
End If
End If
MyBase.WriteAttribute(name, value, fEncode)
End Sub
End Class
Here is the stuff that needed to be added to the web.config:
<configuration>
<configSections>
<section name="rewriter"
requirePermission="false"
type="Intelligencia.UrlRewriter.Configuration.RewriterConfigurationSectionHandler, Intelligencia.UrlRewriter" />
</configSections>
<system.web>
<httpModules>
<add name="UrlRewriter" type="Intelligencia.UrlRewriter.RewriterHttpModule, Intelligencia.UrlRewriter" />
</httpModules>
</system.web>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true">
<add name="UrlRewriter" type="Intelligencia.UrlRewriter.RewriterHttpModule" />
</modules>
<validation validateIntegratedModeConfiguration="false" />
</system.webServer>
<rewriter>
<rewrite url="~/products/(.+)" to="~/products.aspx?category=$1" />
</rewriter>
</configuration>
Our server is running .Net 4, so that might be important too. This solution worked for extensionless URL's and for postbacks, so it satisfied all of my requirements.