我有以下.htaccess代码:
RewriteCond %{QUERY_STRING} (^|&)tmpl=(component|system) [NC]
RewriteRule .* - [L]
RewriteCond %{QUERY_STRING} (^|&)t(p|emplate|mpl)= [NC]
RewriteRule .* - [F]
当我访问时,/administrator/index.phpoption=com_component&task=ajax&format=raw&template=something我收到 403 错误。
我应该如何重构这 4 行以满足第二个条件(在所有 URL 中阻止?tp=等?template=,但以 开头/administrator?)
所以/administrator/index.php?option=com_component&task=ajax&format=raw&template=something应该可以访问,/index.php?option=com_component&template=something不应该。