J
Jon Maz
Hi All,
I'm doing UrlRewriting based on the model in Scott Mitchell's article "URL
Rewriting in ASP.NET".
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnaspp/html/urlrewriting.asp.
In this article the logic for rewriting URLs is contained in Regular
Expressions in the web.config file, like this:
<RewriterConfig>
<Rules>
<RewriterRule>
<LookFor>~/(\d{4})/Default\.aspx</LookFor>
<SendTo>~/ShowBlogContent.aspx?year=$1</SendTo>
</RewriterRule>
</Rules>
</RewriterConfig>
What I like about this approach is that you can change the web.config file
using a text editor and these changes are reflected in the site *without*
having to recompile any dll's.
However (partly because my Regular Expression knowledge isn't that good) I'd
like to do some of the rewriting logic via some plain old C# functions - but
(and here's the tricky bit) still *without* having to recompile.
Can anyone suggest any ways this might be done?
TIA,
JON
I'm doing UrlRewriting based on the model in Scott Mitchell's article "URL
Rewriting in ASP.NET".
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnaspp/html/urlrewriting.asp.
In this article the logic for rewriting URLs is contained in Regular
Expressions in the web.config file, like this:
<RewriterConfig>
<Rules>
<RewriterRule>
<LookFor>~/(\d{4})/Default\.aspx</LookFor>
<SendTo>~/ShowBlogContent.aspx?year=$1</SendTo>
</RewriterRule>
</Rules>
</RewriterConfig>
What I like about this approach is that you can change the web.config file
using a text editor and these changes are reflected in the site *without*
having to recompile any dll's.
However (partly because my Regular Expression knowledge isn't that good) I'd
like to do some of the rewriting logic via some plain old C# functions - but
(and here's the tricky bit) still *without* having to recompile.
Can anyone suggest any ways this might be done?
TIA,
JON