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

* Ramen Ichino (Sannomiya)

Hello!
This is Hide, the Ramen King from Beyond Co., Ltd.'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 before proceeding.
*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 helpful,please give it a "Like"!
2
Loading...
2 votes, average: 1.00 / 12
2,739
X Facebook Hatena Bookmark pocket

The person who wrote this article

About the author

Hide@Infrastructure Engineer

thanks to an incredibly interesting interview.
I joined the company mid-career in the System Solutions Department in Osaka,
My work involves building and operating servers and cloud services!
I also hold LPIC1, AWS SAA, and OCI Architect Associate certifications.

Actually, I love ramen and
have already investigated over 100 ramen shops in Osaka (。-∀-) I'm striving to become the Ramen King of Nihi Beyond
ビヨンドのラーメン王を目指し奮闘中!!

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