Answer the question
In order to leave comments, you need to log in
How to check if a directory exists using .htaccess?
Given.
AddHandler server-parsed .shtml
Options -Indexes +FollowSymLinks +Includes
RewriteEngine On
#RewriteOptions Inherit
RewriteBase /
RewriteCond %{REQUEST_FILENAME} (([^\/]+\/)*[^.]+)\.html
RewriteCond %1.html !-f
RewriteRule ^ 1.shtml [QSA,L,E=VARR:er]
RewriteCond %{REQUEST_FILENAME} (([^\/]+\/)*[^.]+)\.html
RewriteCond %2 !-d
Answer the question
In order to leave comments, you need to log in
1. to make the root document work
2. in the nginx config, find if there is something about .htnl
location ~* \.(html|htm)$ {
error_page 404 /404.html;
expires 30d;
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question