Home Force http requests to https in plesk
Reply: 0

Force http requests to https in plesk

user904
1#
user904 Published in June 20, 2018, 7:40 am

I would like to know it is possible to force a request of an http content to be delivered as https in Plesk 12.5.

I tried adding under "Apache & nginx Settings -> Additional directives for HTTP" the following:

RewriteEngine on RewriteCond %{HTTPS} !=on RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R,QSA]

If i try open a the following image url from chrome browser (win 10): http://www.example.com/image.jpg

it is automatically redirect to:

https://www.example.com/image.jpg

so it look loks like the directive is working.

But if the request is made via Html page

http://www.example.com/image.jpg

the requested content is not provided in https.

Is there a way to force the delivery of the content in https even if made by html request and not by browser?

Greetings,

David

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.330721 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO