I set up 2 EC2 instances where I hosted 2 different apps. One of them is a React app running on nginx and the other one is a Wordpress app.
I wanted to have them both hosted under the same domain like this:
www.example.com -> React app
www.example.com/blog -> Wordpress app
I managed to get this working properly using an ELB on HTTP. The problem came when I added a SSL certificate for my domain and configured it to work with HTTPS.
This is the current configuration for HTTP, I'm redirecting all the traffic from it to HTTPS like this:
The configuration for HTTPS is the following:
Current behavior: When going to www.example.com it correctly forwards me to my React app. When going to www.example.com/blog it also forwards me to my react app instead of redirecting me to the wordpress app. But when refreshing and deleting cache (cmd + shift + R), it correctly forwards me to the wordpress app.
Whats weird to me is that this configuration works for HTTP and not for HTTPS.
Any thoughts on what could be happening?