I've a hard time understanding how URL rewrite work and need your help.
I want to set a server variable "HTTP_BRANDING" to some value, then redirect to another page which is showing ServerVariables to see that value, and all other servervariables values.
For my test purpose, i've created an entry in my hosts file so client.test.com, test.com, and variables.test.com point to 127.0.0.1.
I've also created the server variable HTTP_BRANDING by clicking "View Server Variables" in IIS.
I've written one rule:
- Requested URL: Matches the pattern
- Using: Regular expressions
- Logical Grouping: Match All
- Type: Matches the patttern
- Append query string: checked
So with this rule, i expect that just by typing "client.test.com", it would be triggered since server variable "URL" only contain "/".
This partially work. It redirect to the ShowServerVariables, but this page show HTTP_BRANDING, and it's empty, while most other server variables contain some values.
So my question is Why it doesn't get assigned?
Does anyone have a good tutorial about URL Rewrite? (Something taking few minutes to read, not a 400 pages manual. I don't plan to launch a rocket to the moon with it, just to do this simple task)