.htaccess 将主题扫描重定向到错误页

.htaccess 将主题扫描重定向到错误页,.htaccess,.htaccess,人们经常扫描我使用的主题,每次我收到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

人们经常扫描我使用的主题,每次我收到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错误页面的方法

知道怎么做吗?

像这样

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]

因此,现在只能为css获取/themes/mytheme/style.css。

不,不是真的,因为这些只是几个URL,我可能会获得100个不同的URL。因此,基本上每个需要我的主题文件夹中的内容的url都必须以
http://www.example.com/wp-content/themes/mytheme/
,然后重定向到418页。