I am looking for a rewrite that will pick up any number of defined URL's and do a return 444 on any of them. Rather than writing out each one individually, I was hoping for something where I could do like if location = defined file or list then return 444.
Example of what I am using for each URL, and this works. I would just like to replace the wp-login.php to a list of some sort.
location = /wp-login.php {
return 444;
}
EDIT: I tried doing something like the below, but that did not work unfortunately
location = (/wp-login.php|/wp-admin.php) {
return 444;
}
EDIT2:
Thanks Xavier Lucas, that is exactly what I needed. I used what you mentioned and then added a bit to it to add more different formatted URLs. We were getting a ton of spam to weird URL's so this worked nice.
location ~ ^(/wp-(admin|login)\.php|/url/path(.*)|/url2(.*)) {
return 444;
}