人们不断扫描我正在使用的主题,每次收到404错误邮寄。
目前的结构是
http://www.example.com/wp-content/themes/mytheme/style.css
我收到这样的请求
http://www.example.com/wp-content/themes/bordeaux-theme/style.css
http://www.example.com/wp-content/themes/radial-theme/style.css
http://www.example.com/wp-content/themes/rockstar-theme/style.css
http://www.example.com/wp-content/themes/tisa/themify/js/jquery.js
http://www.example.com/wp-content/themes/simfo/themify/js/jquery.js
我正在寻找将这些请求重定向到一个带有htaccess的418错误页面的方法。
知道怎么做?
答案 0 :(得分:1)
喜欢这个吗?
RewriteEngine On
RewriteCond %{REQUEST_URI} !themes/mytheme
RewriteCond %{REQUEST_URI} \.css$
RewriteRule ^ /errors/teapot418.php [R=418,L]
RewriteCond %{REQUEST_URI} (tisa|simfo).*\.js$
RewriteRule ^ /errors/teapot418.php [R=418,L]
所以现在只能为/themes/mytheme/style.css提取CSS。