Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

HTML - How http-equiv="refresh" redirects to a page without full URL?

I have a html page index.html with the following in the <HEAD> tag to redirect the user to another page when accessed:

<meta http-equiv="REFRESH" content="0; url=main.html">

This works fine in our development environment. However when we move the page to behind a proxy server with SSL termination, the URL is different instead, i.e. when accessing https://mydomain.com:443/index.html it will redirect to main.html with this URL http://mydomain.com:8080/main.html which is not what we expected.

My question is, how does the http-equiv get the complete URL path since we're not specifying it, and whether it has anything to do with the end result where the actual port of the application server is being used in the browser, rather than the reverse proxy's port and protocol.

Thank you.

like image 464
ipohfly Avatar asked Feb 03 '26 02:02

ipohfly


2 Answers

Have you tried

<meta http-equiv="REFRESH" content="0; url=https://mydomain.com:443/main.html">
like image 104
jordan Avatar answered Feb 05 '26 20:02

jordan


Going to assume you have a <base href somewhere, that is why it's not working right.

like image 28
Thomas Avatar answered Feb 05 '26 22:02

Thomas



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!