chore(htaccess): refresh Apache fallback rules for 2.0 layout#45
Merged
Conversation
The .htaccess only matters for Apache deployments — Caddy (live install) and nginx (Docker demo) ignore it. But its deny list still referenced gone 1.x directories (`imanager/`, `modules/`, `core/`) and missed the new PSR-4 source roots (`boot/`, `vendor/`), so on a hypothetical Apache deployer it was simultaneously dead code AND a small defense-in-depth hole. Refreshed: - directory deny list: drop gone `imanager|modules|core`, add `boot|vendor|bin` (real PHP source); - file deny: drop `imanager.php` (gone), keep `boot\.php`; - drop the legacy `imanager/upload/server/php` exception (handler retired in 2.0); - drop the literal `^editor/(.*)` rewrite — the catch-all routes every non-file/dir request to `index.php`, which delegates `/<admin_path>/*` to the editor entry in PHP. Changing `admin_path` in the config now requires no .htaccess edit; - extend the static-asset whitelist with `woff|woff2|ttf|eot` so theme fonts pass the deny chain; - fix unescaped `.` in the regexes. Also drop the matching stale comment in `data/settings/scriptor-config.php` (`admin_path`) that told users they had to update `.htaccess` when changing the admin folder name. Plus: remove the empty `imanager/` leftover directory at the repo root (Phase 14f deleted its contents but the dir lingered, only holding a .DS_Store).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The .htaccess only matters for Apache deployments — Caddy (live install) and nginx (Docker demo) ignore it. But its deny list still referenced gone 1.x directories (
imanager/,modules/,core/) and missed the new PSR-4 source roots (boot/,vendor/), so on a hypothetical Apache deployer it was simultaneously dead code AND a small defense-in-depth hole. Refreshed:imanager|modules|core, addboot|vendor|bin(real PHP source);imanager.php(gone), keepboot\.php;imanager/upload/server/phpexception (handler retired in 2.0);^editor/(.*)rewrite — the catch-all routes every non-file/dir request toindex.php, which delegates/<admin_path>/*to the editor entry in PHP. Changingadmin_pathin the config now requires no .htaccess edit;woff|woff2|ttf|eotso theme fonts pass the deny chain;.in the regexes.Also drop the matching stale comment in
data/settings/scriptor-config.php(admin_path) that told users they had to update.htaccesswhen changing the admin folder name.Plus: remove the empty
imanager/leftover directory at the repo root (Phase 14f deleted its contents but the dir lingered, only holding a .DS_Store).