Answer the question
In order to leave comments, you need to log in
How to configure nginx to open a php file when accessing txt?
How to request log.php when accessing /log.txt? On apache, this was solved by a similar rule in .htaccess:
RewriteEngine On
RewriteRule ^log\.txt$ /log.php [L]
Answer the question
In order to leave comments, you need to log in
Absolutely the same:
location / {
rewrite ^/log\.txt$ /log.php;
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question