Last active
January 24, 2021 18:31
-
-
Save florieger/852152be325d5509abfca3f4acad080b to your computer and use it in GitHub Desktop.
AppCron HTTPS forward with Auth
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RewriteEngine On | |
# AppCron HTTPS forwarder | |
<If "%{HTTPS} != 'on'"> | |
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L] | |
</If> | |
<Else> | |
# Authentication | |
AuthType Basic | |
AuthName "Authentication" | |
AuthUserFile /.../.some_users | |
Require user username1 username2 | |
# Additional Rules | |
RewriteBase / | |
RewriteRule ^index\.html$ - [L] | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteRule . /index.html [L] | |
</Else> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment