Answer the question
In order to leave comments, you need to log in
How to redirect all directories and non-existing files to file.php?
Good afternoon,
I understand the Nginx settings. The question is how to repeat this setting in nginx:
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ __/index.php [L,QSA]
rewrite ^ /__/index.php last;
try_files $uri $uri/ /__/index.php?$args;
if (is_directory || !is_file) { rewrite ^ /__/index.php last; }
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