I have folowing URL:
/ssl/nosso-app/uhul/PRX/CD/wms.cuzk.cz/wms.asp?version=1.3.0&CRS=EPSG:32633&REQUEST=GetMap&FORMAT=image/png&styles=&WIDTH=256&HEIGHT=256&TRANSPARENT=True&layers=KN&BBOX=488672,5510688,488928,5510944
that needs to be sent to ashx handler as:
/ssl/nosso-app/uhul/PRX/ReverseProxy.ashx?loc=wms.cuzk.cz/wms.asp&version=1.3.0&CRS=EPSG:32633&REQUEST=GetMap&FORMAT=image/png&styles=&WIDTH=256&HEIGHT=256&TRANSPARENT=True&layers=KN&BBOX=488672,5510688,488928,5510944
this url goes through few hard ruled firewalls and over another reverse proxy so must be well formed as best as possible ;-( and must keep original form of WMS request. By keep original form we dont need to keep specific client app code for apps behind reverse proxy that creates wms strings for various wms request types.
currently function IsMatch in file DefaultRuleAction.cs, uses property AbsolutePath that returns only location portion of URL, in my case:
/ssl/nosso-app/uhul/PRX/CD/wms.cuzk.cz/wms.asp
after replace with PathAndQuery property returns all, whole original URL, so after my change to code, I can match by this:
RewriteRule ^/CD/([^?]+)\?(.*)$ /ReverseProxy.ashx?loc=$1&$2 [NC,L]
I believe that my version is correct, because it rewrites any URL, comparing to original version that rewrites only queryless URL. This update should be done in both IsMatch and Execute functions in file DefaultRuleAction.cs
I have folowing URL:
that needs to be sent to ashx handler as:
this url goes through few hard ruled firewalls and over another reverse proxy so must be well formed as best as possible ;-( and must keep original form of WMS request. By keep original form we dont need to keep specific client app code for apps behind reverse proxy that creates wms strings for various wms request types.
currently function IsMatch in file DefaultRuleAction.cs, uses property AbsolutePath that returns only location portion of URL, in my case:
after replace with PathAndQuery property returns all, whole original URL, so after my change to code, I can match by this:
I believe that my version is correct, because it rewrites any URL, comparing to original version that rewrites only queryless URL. This update should be done in both IsMatch and Execute functions in file DefaultRuleAction.cs