.htaccess: Allow robots access to /robots.txt

This commit is contained in:
Dennis Camera 2025-02-17 21:00:57 +01:00
parent abfd6dfcd1
commit c0d418cd87
3 changed files with 3 additions and 3 deletions

View file

@ -142,7 +142,7 @@ def json_to_htaccess(robot_json):
robots = map(lambda el: el.replace(" ", "\\ "), robot_json.keys())
htaccess += "|".join(robots)
htaccess += ").*$ [NC]\n"
htaccess += "RewriteRule .* - [F,L]"
htaccess += "RewriteRule !^/?robots\\.txt$ - [F,L]\n"
return htaccess