I'm trying to setup google cloud load-balancer with HTTPS proxy. The rewrite rules doesn't seem to work. I've attached a screenshot of the same. Any help is appreciated.
Basically I'm trying to access <domain>/api/ping
on <domain>/ping
. Not sure what the Host rewrite
is about as well.
Thanks in advance.
Checking if the URL Rewrite module is installed To see if the URL Rewrite module is installed, open IIS Manager and look in the IIS group - if the module is installed, an icon named URL Rewrite will be present. The screenshot below shows an example of a server when the module is installed.
Fiddler is a great tool to see the back and forth between the browser and server. Tools like Process Monitor and native IIS tools are best for getting under the covers. A rewrite doesn't change the URL in the browser, but it does change the URL before the request is fully processed by IIS.
A rewrite rule defines the logic of what to compare or match the request URL with, and what to do if the comparison is successful. Rewrite rules consists of the following parts: Pattern – The rule pattern is used to specify either the regular expression or a wildcard pattern that is used to match URL strings.
I think the problem is that (at the moment) GCP Load Balancers rewrite is only a "path prefix" rewrite, not a full rewrite, i.e. it prepends the value of the "path prefix rewrite" onto the original request URL.
So I suspect what you have currently is resulting in a request to restoplus-api-backend-services
with a URL of /api/ping/ping
.
If you set the value of "path prefix rewrite" to /api
, you should get a request to your backend of /api/ping
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With