Jump to content

Prestashop causing problems in redirection to external URL


Recommended Posts

Hi everyone,

 

I am trying to redirect to external url from within prestashop module but it is producing a wrong redirect headers.

Firstly, the url is in https but prestashop using either Tools::redirect() or Tools::redirectLink() redirects in a way that https convert to http while redirection. I don't know this is from prestashop or my url problem.

 

Thanks in advance.

 

Waseem

Link to comment
Share on other sites

Hi everyone,

 

I am trying to redirect to external url from within prestashop module but it is producing a wrong redirect headers.

Firstly, the url is in https but prestashop using either Tools::redirect() or Tools::redirectLink() redirects in a way that https convert to http while redirection. I don't know this is from prestashop or my url problem.

 

Thanks in advance.

 

Waseem

 

 

Just to get sure - did you put any code after your redirection? Redirection should be and the end.

Link to comment
Share on other sites

You should try printing the exact URL before passing it to the Tools::redirect() function, and see if it is in http or https. Also try visiting the printed URL and see what happens.

 

As per our understanding, it is the problem of the URL that you are redirecting to, as PrestaShop's Tools::redirect() function doesn't adds any such things to any URL.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...