diff options
-rw-r--r-- | apache2.conf | 9 | ||||
-rw-r--r-- | html/_include.php (renamed from html/@include.php) | 0 | ||||
-rw-r--r-- | html/about | 2 | ||||
-rw-r--r-- | html/contact | 2 | ||||
-rw-r--r-- | html/index.php | 2 | ||||
-rw-r--r-- | html/privacy | 2 | ||||
-rw-r--r-- | html/projects/index.php | 2 | ||||
-rw-r--r-- | rawdog/page.template | 2 |
8 files changed, 13 insertions, 8 deletions
diff --git a/apache2.conf b/apache2.conf index a29a16d..030bac1 100644 --- a/apache2.conf +++ b/apache2.conf @@ -157,9 +157,14 @@ RewriteCond %{LA-U:REQUEST_FILENAME} !-d RewriteRule !\. - [H=application/x-httpd-php] - # Disallow access to files/directories whose names begin with "@", returning a 404. + # Disallow access to files/directories whose names begin with "_" or "." + # (except for /.well-known/), returning a 404. # This makes those files appear to not exist. - RewriteRule "/@" "-" [R=404,L] + RewriteCond "%{REQUEST_URI}" "!^/.well-known/" + RewriteRule "/[_.]" "-" [R=404,L] + + # Do not list files beginning with an underscore in directory listings + IndexIgnore _??* <Location /obs> AuthType Basic diff --git a/html/@include.php b/html/_include.php index 7ce79b0..7ce79b0 100644 --- a/html/@include.php +++ b/html/_include.php @@ -1,4 +1,4 @@ -<?php include '@include.php'; ?><!DOCTYPE html> +<?php include '_include.php'; ?><!DOCTYPE html> <html lang="en"> <head> <?php echo indent(site_head('About - Spragg Software Services Ltd.'), 2); ?> diff --git a/html/contact b/html/contact index 632113a..3938f87 100644 --- a/html/contact +++ b/html/contact @@ -1,4 +1,4 @@ -<?php include '@include.php'; ?><!DOCTYPE html> +<?php include '_include.php'; ?><!DOCTYPE html> <html lang="en"> <head> <?php echo indent(site_head('Contact - Spragg Software Services Ltd.'), 2); ?> diff --git a/html/index.php b/html/index.php index 29e0cfa..488d9ba 100644 --- a/html/index.php +++ b/html/index.php @@ -1,4 +1,4 @@ -<?php include '@include.php'; ?><!DOCTYPE html> +<?php include '_include.php'; ?><!DOCTYPE html> <html lang="en"> <head> <?php echo indent(site_head('Spragg Software Services Ltd.'), 2); ?> diff --git a/html/privacy b/html/privacy index 6d338fd..a04ebd6 100644 --- a/html/privacy +++ b/html/privacy @@ -1,4 +1,4 @@ -<?php include '@include.php'; ?><!DOCTYPE html> +<?php include '_include.php'; ?><!DOCTYPE html> <html lang="en"> <head> <?php echo indent(site_head('Privacy - Spragg Software Services Ltd.'), 2); ?> diff --git a/html/projects/index.php b/html/projects/index.php index b995ccf..f7e5f07 100644 --- a/html/projects/index.php +++ b/html/projects/index.php @@ -1,4 +1,4 @@ -<?php include '../@include.php'; ?><!DOCTYPE html> +<?php include '../_include.php'; ?><!DOCTYPE html> <html lang="en"> <head> <?php echo indent(site_head('Projects - Spragg Software Services Ltd.'), 2); ?> diff --git a/rawdog/page.template b/rawdog/page.template index 050f719..df5e817 100644 --- a/rawdog/page.template +++ b/rawdog/page.template @@ -1,4 +1,4 @@ -<?php include '@include.php'; ?><!DOCTYPE html> +<?php include '_include.php'; ?><!DOCTYPE html> <html lang="en"> <head> <?php echo indent(site_head('Blog - Spragg Software Services Ltd.'), 2); ?> |