Skip to content

Instantly share code, notes, and snippets.

@snufkin
Created February 2, 2016 22:28
Show Gist options
  • Save snufkin/57b3e57c3590474a61ec to your computer and use it in GitHub Desktop.
Save snufkin/57b3e57c3590474a61ec to your computer and use it in GitHub Desktop.
Patching D8 htaccess to accept connections to the simplesamlphp library.
diff --git a/.htaccess b/.htaccess
index 974999a..b24f3e0 100644
--- a/.htaccess
+++ b/.htaccess
@@ -150,6 +150,10 @@ 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]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment