Answer the question
In order to leave comments, you need to log in
How to convert a rule from apache to nginx?
Each subdomain has its own robots.txt. Task: when accessing robots.txt, process the request in robots.php, which in turn returns the required robots.txt.
Previously, this rule was processed in .htaccess on apache.
RewriteCond %{REQUEST_FILENAME} robots.txt
RewriteCond %{DOCUMENT_ROOT}/robots.php -f
RewriteRule ^(.*)$ /robots.php [L]
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