jbmanos
(John B Manos)
June 11, 2017, 8:05pm
1
I have this block and I’ve tried it a million ways, but the readme/changelog blocks never work.
I would like to block any readme.(html|md|txt) or changelog with same extension variants as 403.
here’s the latest attempt.
status 403 {
/wp-config.php
/wp-admin/install.php
/wp-admin/includes/comment.php
/wp-admin/network/menu.php
/wp-admin/user/menu.php
/wp-includes/admin-bar.php
~*((readme|changelog)\.(txt|html|md))
~*readme.md
~*readme.html
~*changelog.html
~*changelog.md
~*changelog.txt
}
I’m pulling my hair out at what should be easy –
jbmanos
(John B Manos)
June 11, 2017, 10:38pm
2
It appears that the status block does not support regex yet?
Well, that stinks.
See Deny access to to specific files - #4 by matt
You can cheat your way around that a little bit by using rewrites
:
rewrite {
r ^some-regex
to /404
}
status 404 /404
2 Likes
jbmanos
(John B Manos)
June 13, 2017, 12:42am
4
Thanks to your reply on the other bad bot thread, I was able to piece that together. And, I even have a wordpress import file now… it’s running swimmingly.
Thanks for your help to me!
system
(system)
Closed
September 11, 2017, 12:42am
5
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.