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

*Ramen Ichijo (Sannomiya)

Hello!
My name is Hide, the ramen king of Beyond Osaka Office.
This is my 9th post.

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

This time, continuing from the previous article, I will write about how to configure URL redirection using GCLB's global external HTTP(S) load balancer.

It's a little more difficult than the traditional method, but let's do our best together.

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

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

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

Setting procedure

*This assumes that you have created a load balancer (LB).

① Load balancing > LB name > Click Edit

② Select detailed host and path rules and click [Add host and path rules]

③ Specify the redirect source domain with new host and path rules

④ Set redirection and click [Update]

URL redirect setting official document

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

⑤ Operation check

*Please do this after the LB update is complete.
*Please check if you are redirected.

 

 

summary

What do you think?

Traditional global HTTP(S) load balancers are easy to set up redirects, but global HTTP(S) load balancers are coded, which can be confusing.

However, if you can properly set up redirects with a load balancer, you can do it without putting any load on the server, so it is recommended.

If you want to set up redirection with GCP's LB, please use this as a reference!

If you found this article helpful , please give it a like!
2
Loading...
2 votes, average: 1.00 / 12
2,575
X facebook Hatena Bookmark pocket

The person who wrote this article

About the author

Hide@Infrastructure Engineer

It all started with a very interesting interview.
A mid-career employee of the System Solutions Department in Osaka.My
job is to build and operate servers and clouds!
I have the qualifications of LPIC1, AWS SAA, and OCI Architect Associate.

Actually, I love ramen and
have investigated over 100 stores in Osaka (。-∀-) I'm striving to become the Ramen King of Nibi Beyond
!

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