summaryrefslogtreecommitdiffstats
path: root/samples/OpenIdProviderWebForms/Code/URLRewriter.cs
diff options
context:
space:
mode:
authorAndrew Arnott <andrewarnott@gmail.com>2009-03-19 18:27:02 -0700
committerAndrew Arnott <andrewarnott@gmail.com>2009-03-20 15:38:14 -0700
commitefbd27e75ab9b91cbc56c146cbb291b1ab190cbf (patch)
treef86807cdb3607bc90dab8a76a8d062d384296d00 /samples/OpenIdProviderWebForms/Code/URLRewriter.cs
parent41f796ba0ef0abe3ca3772c52cf534aec3bc2574 (diff)
downloadDotNetOpenAuth-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.cs6
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));
}
}