Forum Discussion
Hi Paulius Thank you for your time!.
Let me explain it in more detail.
We have a single website published on one IIS server called Q.
Client 1: Enter by URL: www.abc.com/login.aspx
Internal application path map: Qserverpath\clientfolder1\login.aspx
Client 2: Enter by URL: www.abc.com/subsite2/login.aspx
Internal application path map: Qserverpath\clientfolder2\login.aspx
Need:
Let client 2 enter its internal path but from the domain www.xyz.com
In other words hide the www.abc.com domain and replace it with www.xyz.com and map internal folder path: Qserverpath\clientfolder2\login.aspx
lavila85 First two conditions you can be achived using stringmap in irule as shown below.
but not able to understand your last requirement, whether you need replace www.xyz.com to www.abc.com before sending to pool members keeping the same URI path or you need rewrite the www.abc.com back to www.xyz.com while responding back to client 2?
sample irule with stringmap
when HTTP_REQUEST {
if {[HTTP::uri] eq "/login.aspx"} {
HTTP::uri [string map {"/login.aspx" "/Qserverpath/clientfolder1/login.aspx"}[HTTP::uri]]
}
elseif {[HTTP::uri] eq "/subsite2/login.aspx"} {
HTTP::uri [string map {"/subsite2/login.aspx" "/Qserverpath/clientfolder2/login.aspx"}[HTTP::uri]]
}
}