Overall objective: using ARR and URL rewrite,
- deptone.domain.com --> app1.domain.com/deptone
- deptone.domain.com/folder1 --> app1.domain.com/deptone/folder1
- deptone.domain.com/folder1/index.html --> app1.domain.com/deptone/folder/index.html
- deptone.domain.com/folder1 --> app1.domain.com/deptone/folder1/ (trailing slash added)
a request to deptone.domain.com needs to get to a protected DMZ server as app1.domain.com/deptone .
Infrastructure:
- All requests come in to a ARR server in the 'public' DMZ. An IIS site (DNS points to that IIS site) on that server contains URL rewrite rule (defined at the site level on the ARR server)
<rule name="deptone rule" enabled="true" stopProcessing="true"><match url=".*" /><conditions><add input="{HTTP_HOST}" pattern="^(www.)?(deptone).domain.com(.*)" /></conditions><action type="Rewrite" url="app1.domain.com/{C:2}{C:3}" appendQueryString="false" logRewrittenUrl="true" /></rule>
The IIS site for app1.domain.com is on a separate server in a protected DMZ area. It contains the content folders and pages.
This process will be used by multiple departments, so the 'pattern' regex will eventually contain
"^(www.)?(deptone|depttwo|deptthree).domain.com(.*)"
(That regex could probably be more generic, but not all 'dept' 'subdomains' will use this rewriting.)
FRT on the ARR server shows that the requested url of deptone.domain.com is being rewritten to app1.domain.com/deptone (URL_CHANGED value). But further down in the FRT is shows
ModuleName="ApplicationRequestRouting", Notification="MAP_REQUEST_HANDLER", HttpStatus="502", HttpReason="Bad Gateway", HttpSubStatus="3", ErrorCode="The data is invalid. (0x8007000d)", ConfigExceptionInfo=""
From the ARR server, I can browse to app1.domain.com/deptone (or any other of the example urls above).
The Application Request Routing screen (at the server level) on the ARR server has "Enable Proxy" checked, with all other values as default.
There are no URL rewrite rules enabled on the app1.domain.com IIS site (separate server in protected DMZ).
I've been through tons of links to ARR and URL rewrite on this site, plus other sites about subdomain rewriting, but none have helped.
What needs to be done (specifically) to get the URL deptone.domain.com to show content from app1.domain.com/deptone ? I've been fighting with this for much too long....
Thanks...Rick...