Hi,
I have this rule in my nginx config file
location ~* \/(fileA.txt|fileB.txt)$ {
return 404 'nothing here';
}
but it’s not working
but
location /fileA.txt {
return 404 'nothing here';
}
is working…
Any idea what’s wrong ?
Thanks.
You aren’t escaping your periods. Try like this:
location ~* \/(fileA|fileB)\.txt$ { return 404 'nothing here'; }
Thanks @elbucho@lemmy.world
I’ve tried
but still not matching :'(
.md or .txt?
.md is correct, it’s a test.