Force HTTP instead of HTTPS for 1 page only

Hi,

I have a problem with my bank. The return URL is configured as HTTP on their side, so the payment cannot be processed correctly. While they change that configuration (it can take a while, french bank …), I’d like to force an URL to HTTP instead of HTTPS.

How could I do that please ? I’m using the default letsencrypt SSL.

Thanks !

Regards,

Mat

You can do that with htaccess.

http://www.inmotionhosting.com/support/website/ssl/how-to-force-https-using-the-htaccess-file

Hi Folke,

Thanks for your reply, but I’m using EasyEngine and so NGINX. And moreover, the idea is to force HTTP for 1 URL only. The site is already “forced” to use HTTPS for the whole site.

Hi @Mat_

Since force HTTPS is applied I think that url should also be redirect to https://.

Can you please try with 307 HTTP redirection rather that 301.

server {
        listen 80;
        server_name www.example.com example.com;
        return 307 https://example.com$request_uri;
}

Yes yes it is redirected and that’s the problem :slight_smile: I need every URL on HTTPS except one (let’s say http://myurl.com/confirm)