files/htaccess-required
Severity: warning · Status: enforced · Applies to: ids/**
What
A directory under ids/ must contain an .htaccess, or contain a sub-directory that does.
Why
The .htaccess is the only thing that makes an identifier resolve. Without one — anywhere in the directory or below it — https://w3id.org/my-project/ returns 404, and the directory is doing nothing but occupying a name.
A directory that exists only to group sub-identifiers is fine and is not reported:
ids/my-org/
├── project-a/.htaccess
└── project-b/.htaccessids/my-org/ has no rules of its own, but everything under it resolves.
Wrong
ids/my-project/
└── README.mdNothing here answers a request.
Right
ids/my-project/
├── .htaccess
└── README.mdHow to fix
Add the file. The smallest useful one:
RewriteEngine on
RewriteRule ^$ https://example.org/my-project/ [R=302,L]If the directory was left behind by a change that removed its rules, remove the directory too.
How to check
Run w3id-check with --rule files/htaccess-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 files/htaccess-required ids/my-projectTesting your changes covers installing the tool, and what else is worth checking by hand.