htaccess/rewrite-engine-required
Severity: error · Status: enforced · Applies to: ids/**/.htaccess
What
A file containing RewriteRule directives must switch the rewrite engine on first:
RewriteEngine onWhy
Without it, Apache ignores every rewrite rule in the file. There is no error and no warning — the rules are simply never consulted, and every request to the identifier falls through to a 404.
The file looks completely reasonable. It contains rules, the rules are correct, and none of them run.
RewriteEngine off has the same effect and is reported the same way.
Wrong
RewriteRule ^$ https://example.org/ [R=302,L]Right
RewriteEngine on
RewriteRule ^$ https://example.org/ [R=302,L]How to fix
Add RewriteEngine on above the first rule. It goes once per file, not once per rule.
Files using only Redirect or RedirectMatch do not need it — those come from a different Apache module — and are not reported.
How to check
Run w3id-check with --rule htaccess/rewrite-engine-required to check this rule on its own; without it the tool runs every rule, as the pull request checks do.
node tools/check/bin/w3id-check.js --rule htaccess/rewrite-engine-required ids/my-projectTesting your changes covers installing the tool, and what else is worth checking by hand.