From ff99de766bf1e7c387131e35eca4a9c6ca5e85ea Mon Sep 17 00:00:00 2001 From: "Amy J. Ko" Date: Mon, 20 Feb 2023 17:25:06 -0800 Subject: [PATCH] Added missing MIME, updated fallback. --- .htaccess | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.htaccess b/.htaccess index 6db40e6..45624bc 100644 --- a/.htaccess +++ b/.htaccess @@ -4,6 +4,9 @@ RewriteEngine On RewriteBase /ajko/books/cooperative-software-development +# Define missing mjs MIME type. +AddType application/javascript .mjs + # Remove the ending trailing slash from any requests to avoid resolving to directory listings RewriteRule ^(.*)/$ $1.html @@ -16,4 +19,4 @@ RewriteRule ^(.*)$ $1.html [L,QSA] # If we're processing a path that isn't a file or a directory, rewrite to index but preserve the query string. RewriteCond %{REQUEST_FILENAME} !-f -RewriteRule (.*) index.html [L,QSA] +RewriteRule (.*) 404.html [L,QSA]