M
M
m7dev2022-03-21 16:28:34
htaccess
m7dev, 2022-03-21 16:28:34

How to open access to robots.txt, while blocking all other .txt files through FilesMatch?

Good afternoon. Please tell me how to open access to robots.txt in such a bundle -

<FilesMatch ".(zip|7z|rar|txt|sql)$">
 Order Allow,Deny
 Deny from all
</FilesMatch>

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
dodo512, 2022-03-21
@m7dev

<FilesMatch ".(zip|7z|rar|txt|sql)$(?<!^robots\.txt)">
 Order Allow,Deny
 Deny from all
</FilesMatch>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question