I am having a hard time adding a 404 not found page to a specific sub directory example.com/staging/ where I have a small website running which is completely independant from the website in root. However, I constantly get 500 Internal Server Errors.
The website in the sub directory consists of static html pages only, no CMS or databases are attached to it. The 404.html is placed directly in the root of the sub directory /staging/.
The code which is in my .htaccess file for the directory example.com/staging/:
“`
Options -Indexes -MultiViews
RewriteEngine on
RewriteCond %{SCRIPT_FILENAME} !-f
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteRule ^(.*)$ $1.html [L]
RewriteRule ^arbeiten/$ /staging/arbeiten/alle [R=301,L]
RewriteRule ^journal/$ /staging/journal/journal-alle [R=301,L]
ErrorDocument 404 /staging/404.html
“`