Home let's encrypt auto-rule to redirect trafic from http to https excepted some files
Reply: 0

let's encrypt auto-rule to redirect trafic from http to https excepted some files

user708
1#
user708 Published in June 20, 2018, 7:30 am

My Let's encrypt cerbot (on apache 2.4) has made an auto-redirection from http trafic to https what is very appreciate.

But in some cases, I need to access some files from http protocol (here image.jpg).

I readed other questions about redirection except one folder, or some pages, but it doesn't work for me.

Here is my code :

RewriteCond %{SERVER_NAME} =www.domain.ch [OR]
RewriteCond %{SERVER_NAME} =upload.domain.ch [OR]
RewriteCond %{SERVER_NAME} =domain.ch
RewriteCond %{REQUEST_URI} !^image.jpg
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]

Thanks in advance

You need to login account before you can post.

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

© 2016 Powered by mzan.com design MATCHINFO