[Part 2] How to set up URL redirection with GCP's global external HTTP(S) load balancer

* Ramen Ichino (Sannomiya)

Hello!
I'm Hide, the Ramen King from Beyond Inc.'s Osaka office.
This is my ninth post.

Last time, I wrote about how to set up URL redirection using the global external HTTP(S) load balancer (traditional type) of GCP's Google Cloud Load Balancing (GCLB)!

This time, continuing from the last article, I will write about how to set up URL redirection with GCLB's global external HTTP(S) load balancer

It's a little difficult and different from the traditional method, but let's work hard together

*If you are interested in traditional URL redirection settings, please take a look at the article below!

[Part 1] How to set up URL redirection with GCP's global external HTTP(S) load balancer (traditional type)

[Part 1] How to set up URL redirection with GCP's global external HTTP(S) load balancer (traditional type)

Setup Procedure

*This assumes that a load balancer (LB) has been created

① Click Load Balancing > LB Name > Edit

② Select Advanced Host and Path Rules and click [Add Host and Path Rule]

③ Specify the source domain in the new host and path rule

④ Set the redirect and click [Update]

Official URL redirection settings documentation

defaultService: global/backendServices/backend name name: matcher1 *Specify your preferred name routeRules: - urlRedirect: stripQuery: true *Whether to delete query hostRedirect: test2.com *Specify redirect destination matchRules: - prefixMatch: / *Specify path when redirected priority: 0 *0 is the highest priority

⑤ Operation check

*Please wait until the LB update is complete.
*Please check if you are redirected.

 

 

summary

What did you think?

Traditional global HTTP(S) load balancers make it easy to set up redirects, but global HTTP(S) load balancers are coded, so I think it can be a bit tricky

However, if you can properly set up the redirection on the load balancer, it is recommended because you can redirect without putting a load on the server and without having to set up the redirection on the server

If you are setting up redirection with GCP LB, please refer to this!

If you found this article useful, please click [Like]!
2
Loading...
2 votes, average: 1.00 / 12
2,626
X Facebook Hatena Bookmark pocket

The person who wrote this article

About the author

Hide@Infrastructure Engineer

It all started with a really interesting interview.
I joined the System Solutions Department in Osaka mid-career and
am currently involved in the construction and operation of servers and clouds!
I hold LPIC1, AWS SAA, and OCI Architect Associate certifications.

In fact, I love ramen and
have investigated over 100 ramen shops in Osaka (。-∀-) I am striving to become the ramen king of Nibi Beyond

I'm also on Twitter, so please follow me (´∇`)
Click on the Twitter mark in the right corner!!