-
Notifications
You must be signed in to change notification settings - Fork 14
Description
Greetings again :)
First of all my apologies for my bad English.
On topic:
When i'm trying to install Let's Encrypt based certificates on for example a HTML site. It does work without .htaccess redirects to https, but if they exist, the challenge cannot be completed.
I'm not sure if thats normal or not. I'm wondering how auto renewal will behave with this seems to be issue.
I've found a work around for the .htaccess, where te REMOTE_ADDR is the main IP of your server:
Force SSL
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteCond %{REMOTE_ADDR} !^123.123.123.123$
RewriteRule ^.$ https://%{SERVER_NAME}%{REQUEST_URI} [R=301,L]
RewriteCond %{HTTP_HOST} !^www.
RewriteCond %{REMOTE_ADDR} !^123.123.123.123$
RewriteRule . https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]