7

I need to perform a 302 redirect with PHP. I'm trying with header location.

It works well with HTTP. But, the redirect does not work with a custom protocol. For example:

header ('Location: magplus://myaccountview/login/');

How I can fix it?

Brad
  • 159,648
  • 54
  • 349
  • 530
user2423341
  • 141
  • 4

1 Answers1

7

For some browsers, you will not be able to redirect to a protocol other than HTTP or HTTPS. There is nothing you can do about that specifically.

You can try to change the location in the browser client-side with JavaScript, if that is a possibility for your application. That also won't always work however.

Brad
  • 159,648
  • 54
  • 349
  • 530