0

I am using header('Location:../page.php') to redirect to a page in the same folder. This worked locally and in the past on another host. Yet for some reason this won't work on the new host I'm using.

I've also tried to use:

header('url:https://site/page.php')
header('url:'. $_SERVER['HTTP_HOST'] .'/page.php')
header('Location:'. $_SERVER['HTTP_HOST'] .'/page.php')

Each time I stay on the same URL and receive a blank page. Any ideas what could be the issue?

Marthy_Mc_Fly
  • 93
  • 1
  • 7
  • `../` isn't the same folder though, it's the parent folder. `./` is the same folder, or just `page.php` – brombeer Jun 20 '21 at 09:21
  • Make sure there's no space before the PHP opening tag. That one can also cause that. Or make sure there's no output (as in echo or HTML codes) before the header code. It can also cause that – ket-c Jun 20 '21 at 10:34

0 Answers0