From 604b3ae8f29a522270c3c754591eeff1fa15e4cd Mon Sep 17 00:00:00 2001 From: Adam Spragg Date: Mon, 18 Jun 2018 21:21:06 +0100 Subject: Extensionless files in root should be handled as PHP --- apache2.conf | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'apache2.conf') 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] AuthType Basic -- cgit v1.2.1