summaryrefslogtreecommitdiff
path: root/apache2.conf
diff options
context:
space:
mode:
authorAdam Spragg <adam@spra.gg>2018-06-18 21:21:06 +0100
committerAdam Spragg <adam@spra.gg>2018-06-18 21:21:06 +0100
commit604b3ae8f29a522270c3c754591eeff1fa15e4cd (patch)
tree1f7b541660a7876a74f277bbf6dc2a484265cd86 /apache2.conf
parentcfa960d860fa30c7e2bb63cdf1c32e4f200b98ae (diff)
Extensionless files in root should be handled as PHP
Diffstat (limited to 'apache2.conf')
-rw-r--r--apache2.conf6
1 files changed, 6 insertions, 0 deletions
diff --git a/apache2.conf b/apache2.conf
index 6cd31b0..fdf764a 100644
--- a/apache2.conf
+++ b/apache2.conf
@@ -150,6 +150,12 @@
# General global settings here...
AddDefaultCharset utf-8
Header always set Strict-Transport-Security "max-age=31536000"
+ RewriteEngine On
+
+ # For URIs in the root directory without any extension, which are files, use PHP handler
+ RewriteCond %{REQUEST_URI} "^/[^/.]+$"
+ RewriteCond %{LA-U:REQUEST_FILENAME} !-d
+ RewriteRule !\. - [H=application/x-httpd-php]
<Location /obs>
AuthType Basic