Question
Redirect to different port when url start with a specific path/string
Hi all!
I created a website using WordPress and next.js, all using Docker. My frontend part (next.js) is exposed on port 80 so I can see my site when I write the correct URL. Wordpress is exposed to port 8080 and to access my admin part I need to write MY_IP:8080/wp-admin/
.
I would like to find a way to see the content of MY_IP:8080/wp-admin/
every time I write the URL of my website like this MY_URL/wp-admin/
but of course, continuing to see the URL with the right name of my site (MY_URL/wp-admin/
) and not with MY_IP:8080/wp-admin/
.
Of course, I need this logic also for any subfolder/file when the path starts with wp-admin
(i.e. MY_URL/wp-admin/post.php?post=320&action=edit
).
Does somebody know what I need to check for making this possible?
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
×