Question

In my web app you get redirected after successful login via header('Location: https://domain.com/loggedin') but when its finished redirecting I get to following URL http://domain.com:443/loggedin which give (of course) following error

400 Bad Request

Your browser sent a request that this server could not understand.
Reason: You're speaking plain HTTP to an SSL-enabled server port.
Instead use the HTTPS scheme to access this URL, please.

What do I have to change? What did I do wrong or what do I have to add?

Was it helpful?

Solution

This sounds absurd but after some thinking: I added a slash (/) at the end so now it looks like this header('Location: '.PROJECT_HTTP_ROOT.'/');.

Works like it should now!

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top