302 redirect to protocol without HTTP

I need to do a 302 redirect with PHP. I am trying with the location of the header.

It works well with HTTP. But redirection does not work with user protocol. For instance:

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

How can i fix this?

+6
source share
1 answer

For some browsers, you will not be able to redirect to a protocol other than HTTP or HTTPS. You can't do anything about it.

You can try to change the location on the client side of the browser using JavaScript, if possible for your application. This also will not always work.

+7
source

Source: https://habr.com/ru/post/947960/


All Articles