I've been trying a few rules and nothing seems to work. All I want to do is change the error from 404 to 410 whenever someone (specially Google's bot) tries to access the subdirectory /forums/*
RewriteRule ^forums/ - [G]
Does not work
Cool, that worked (putting it at the begging of the file). Wonder what blocked it? Considering I only have the stuff from LS Cache WP plugin and WordPress default.
There is a minor difference in the way LiteSpeed Web Server and Apache treat the [L] flag in rewrite rules. The [L] flag (“L” stands for “Last”) causes mod_rewrite to stop processing the ruleset. There are two ways to interpret this:
In most contexts, including LiteSpeed Web Server, this means that if the rule matches, no further rules will be processed. LSWS exits from the rewrite completely to avoid looping.
In Apache, [L] means that if the rule matches, no further rules will be processed in the current iteration. Apache does not exit from the rewrite rule completely, and so there is a possibility of looping.