Answer the question
In order to leave comments, you need to log in
How to compose rule to exclude .html in RewriteRule?
RewriteRule ^(.*)\.html$ 404.php [R=404]
how to do negation, i.e. where to add!
so that the rule works for /123.htm, /123, ..
well, of course, so that for / does not work
, you can test here htaccess.mwl.be
Answer the question
In order to leave comments, you need to log in
The first time I see a question with an answer, well, just put it!
cond is if and if and if then
RewriteCond
RewriteCond
RewriteCond
then
RewriteCond %{REQUEST_URI} !index.\html$
RewriteRule ^(.*)\.html$ 404.php [R=404]
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question