Answer the question
In order to leave comments, you need to log in
How to check the existence of a file using .htaccess?
The site receives a request of
the form site.xxx/path/file.AAA redirect)?
As I can see. If the file does not exist then
RewriteRule ^(.*)\.ААА$ _engine.html?error [QSA,L]
if there is then
RewriteRule ^(.*)\.ААА$ _engine.html?$1 [QSA,L] (this is working rule)
but can't make RewriteCond conditions.
Ap1
It's easier, code:
RewriteCond %{REQUEST_FILENAME} (.*)\.ААА
RewriteCond %1.BBB !-f
RewriteRule ^ _engine.html?404 [QSA,L]
Works if there is an error in the name, but does not work if there is an error on my way
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question