iis - URL rewrite - REMOTE_USER always empty -
I URL re-write is required to rule adds REMOTE_USER value for the query string. I made my app simple to masterful, though, REMOTE_USER is always empty when the rule condition is evaluated.
My web site, configured in IIS 7, uses integrated mode with AP Pool NIT 2.0. I disabled the unknown ath and enabled Windows Ath on the site through IIS Manager and I also added the line in the web connection so that anonymous access could be stopped. Here are my two files.
web.config:
& lt ;? XML version = "1.0" encoding = "UTF-8"? & Gt; & Lt; Configuration & gt; & Lt; System.webServer & gt; & Lt; Security & gt; & Lt; Authority & gt; & Lt; Remove users = "?" Roles = "" verbs = "" /> & Lt; / Authorization & gt; & Lt; / Safety & gt; & Lt; Rewrite & gt; & Lt; Rules & gt; & Lt; Clear /> & Lt; Rule name = "Add login to URL" stopProcessing = "true" & gt; & Lt; Mail url = ". *" * / / Gt; & Lt; Terms Rational Group = "Match All" TrackAlquatch = "True" & gt; & Lt; Input = "{QUERY_STRING}" pattern = "login" reject = "true" /> & Lt; Input = "{REMOTE_USER}" pattern = "(. *)" / & Gt; Add & lt; / Status & gt; & Lt; Action type = "redirect" url = "{HTTP_URL}? Login = {C: 1}" redirect type = "temporary" / & gt; & Lt; / Rules & gt; & Lt; / Rules & gt; & Lt; / Rewrite & gt; & Lt; /system.webServer> & Lt; / Configuration & gt; default.asp
& lt;% = request White ("REMOTE_USER")% & gt; have never been my rule kills because when conditions are evaluated, then {REMOTE_USER} always clear is (other servers appear in variable rules, so it is only {REMOTE_USER} is). The turning point is that default.asp shows my REMOTE_USER value.
Any suggestions why this happened? Thank you
I do not know that I got did not before me the link. As I suspect, Ath is run after Youth rewrite rules and can not be used to redirect Remote / USER. I think I have to write my own redirection module.
Comments
Post a Comment