Options -Indexes
<IfModule mod_headers.c>
  <FilesMatch "\.(html)$">
    Header set Cache-Control "no-cache, no-store, must-revalidate"
    Header set Pragma "no-cache"
    Header set Expires "0"
  </FilesMatch>
</IfModule>
RewriteEngine On
RewriteBase /cornerstone-codex/

RewriteCond %{THE_REQUEST} \s/+cornerstone-codex/index\.html[\s?] [NC]
RewriteRule ^index\.html$ /cornerstone-codex/ [R=301,L]

RewriteCond %{THE_REQUEST} \s/+cornerstone-codex/(.+)/index\.html[\s?] [NC]
RewriteRule ^(.+)/index\.html$ /cornerstone-codex/$1/ [R=301,L]

RedirectMatch 404 ^/cornerstone-codex/(wp-admin|wp-json|xmlrpc|cron|food-drive-registration|hello-world|comments|feed)(/.*)?$
<FilesMatch "\.(php|phtml|phar)$">
  Require all denied
</FilesMatch>
