Webghost
Webghost

Reputation: 933

Route to two different application on same domain

I have about 2000 pages served dynamically on my website.

The structure of the URL is like example.com/content-x or example.com/content-y i.e. URLs without distinct patterns.

I have got two sites built on two different servers and languages. Each of them serves about 1000 pages. Example. example.com/content-x is served from one site where example.com/content-y is served from another one.

What's the best way to sever those two applications as one site?

I'm looking at solutions like AWS advance routing where you can configure the load balancer to the server from different servers. But without distinct pattern of URL, I don't see it's easy there.

Can anyone point me which layer is the best to define this kind of rule? Could I do this in the webserver (eg: Nginx) instead? What I'm looking for is to probably have a JSON (or likes) data in a file or any storage and either web server or load balancer to read that configuration and serve the page. Or obviously any other type of solution is most welcome.

Thanks

Upvotes: 0

Views: 1397

Answers (1)

Arun Kamalanathan
Arun Kamalanathan

Reputation: 8593

You could easily do this in application load balancer. the applciation load balancer supports path based routes.

In this scenario, you can have the path /content-x pointing to target group x while the path /content-y is pointing to target group y.

Each target group could be serving different applications.

Reference: How do I achieve path-based routing on an Application Load Balancer

Upvotes: 2

Related Questions