Skip to content

Instantly share code, notes, and snippets.

@filipecifali
Created July 26, 2018 17:24
Show Gist options
  • Save filipecifali/068725a5aad982290a5dbcf2b0e87345 to your computer and use it in GitHub Desktop.
Save filipecifali/068725a5aad982290a5dbcf2b0e87345 to your computer and use it in GitHub Desktop.
letsencrypt apache/httpd 2 rewrite
<Directory /usr/share/zabbix>
RewriteEngine On
RewriteBase /
# Dont redirect on challenges
RewriteCond %{SERVER_PORT} 80
RewriteCond %{REQUEST_URI} ^/.well-known/acme-challenge
RewriteRule ^(.*) - [R=301,L]
RewriteCond %{REQUEST_URI} !^/.well-known/acme-challenge
RewriteRule ^(.*) https://example.com/$1 [R=301,L]
</Directory>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment