diff options
author | Andrew Arnott <andrewarnott@gmail.com> | 2009-03-19 18:27:02 -0700 |
---|---|---|
committer | Andrew Arnott <andrewarnott@gmail.com> | 2009-03-20 15:38:14 -0700 |
commit | efbd27e75ab9b91cbc56c146cbb291b1ab190cbf (patch) | |
tree | f86807cdb3607bc90dab8a76a8d062d384296d00 /samples/OpenIdProviderWebForms/Code/URLRewriter.cs | |
parent | 41f796ba0ef0abe3ca3772c52cf534aec3bc2574 (diff) | |
download | DotNetOpenAuth-efbd27e75ab9b91cbc56c146cbb291b1ab190cbf.zip DotNetOpenAuth-efbd27e75ab9b91cbc56c146cbb291b1ab190cbf.tar.gz DotNetOpenAuth-efbd27e75ab9b91cbc56c146cbb291b1ab190cbf.tar.bz2 |
Enhanced URL rewriter to allow for virtual directories or not, without changing the routes.
Diffstat (limited to 'samples/OpenIdProviderWebForms/Code/URLRewriter.cs')
-rw-r--r-- | samples/OpenIdProviderWebForms/Code/URLRewriter.cs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/samples/OpenIdProviderWebForms/Code/URLRewriter.cs b/samples/OpenIdProviderWebForms/Code/URLRewriter.cs index daa4dea..be65e0a 100644 --- a/samples/OpenIdProviderWebForms/Code/URLRewriter.cs +++ b/samples/OpenIdProviderWebForms/Code/URLRewriter.cs @@ -38,12 +38,14 @@ namespace OpenIdProviderWebForms.Code { continue; } - Regex reg = new Regex(urlNode.InnerText, RegexOptions.IgnoreCase); + string oldValue = HttpContext.Current.Response.ApplyAppPathModifier(urlNode.InnerText); + + Regex reg = new Regex(oldValue, RegexOptions.IgnoreCase); // if match, return the substitution Match match = reg.Match(path); if (match.Success) { - return reg.Replace(path, rewriteNode.InnerText); + return reg.Replace(path, HttpContext.Current.Response.ApplyAppPathModifier(rewriteNode.InnerText)); } } |