Hi,
I have deployed our website as a Cloud Run service.
Added a load balancer as per the doc listed in this link https://cloud.google.com/run/docs/integrate/custom-domain-load-balancer
Everything is perfect and My website is now runnings as https://abc.com
I am currently exploring redirecting www.abc.com to https://abc.com
Tried adding a Host and path rule by editing the custom-domains http with the following yaml config for www.abc.com
defaultService: projects/xyz/global/backendServices/custom-domains-abc-com-abc-49a4-be
name: matcher1
routeRules:
- urlRedirect:
stripQuery: true
hostRedirect: abc.com
matchRules:
- prefixMatch: /
priority: 1
Now I am able to redirect www.abc.com to https://abc.com . However if I access www.abc.com/page1, it redirects me to https://abc.com instead of https://abc.com/page1
Can you assist me on how can I acheive this.
Also, let me know if this is the best practice to be followed as well.
Regards
Srinivasan
Solved! Go to Solution.
I believe that your problem was in setting stripQuery to true. Something like: