-
Notifications
You must be signed in to change notification settings - Fork 397
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added sample patches for SSL and SAML. (#602)
- Loading branch information
1 parent
6427b28
commit 1a9b3d1
Showing
2 changed files
with
30 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
diff --git a/.htaccess b/.htaccess | ||
index 4716fa1..93f9ab6 100644 | ||
--- a/.htaccess | ||
+++ b/.htaccess | ||
@@ -150,6 +150,8 @@ AddEncoding gzip svgz | ||
# Copy and adapt this rule to directly execute PHP files in contributed or | ||
# custom modules or to run another PHP application in the same directory. | ||
RewriteCond %{REQUEST_URI} !/core/modules/statistics/statistics.php$ | ||
+ # Allow access to simplesaml paths | ||
+ RewriteCond %{REQUEST_URI} !^/simplesaml | ||
# Deny access to any other PHP files that do not match the rules above. | ||
# Specifically, disallow autoload.php from being served directly. | ||
RewriteRule "^(.+/.*|autoload)\.php($|/)" - [F] |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
diff --git a/.htaccess b/.htaccess | ||
index 4716fa1..14014ce 100644 | ||
--- a/.htaccess | ||
+++ b/.htaccess | ||
@@ -122,6 +122,12 @@ AddEncoding gzip svgz | ||
# uncomment the following line: | ||
# RewriteBase / | ||
|
||
+ # Redirect HTTP to HTTPS on cloud | ||
+ RewriteCond %{ENV:AH_SITE_ENVIRONMENT} !^$ | ||
+ RewriteCond %{HTTPS} off | ||
+ RewriteCond %{HTTP:X-Forwarded-Proto} !https | ||
+ RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] | ||
+ | ||
# Redirect common PHP files to their new locations. | ||
RewriteCond %{REQUEST_URI} ^(.*)?/(install.php) [OR] | ||
RewriteCond %{REQUEST_URI} ^(.*)?/(rebuild.php) |