eilonwy
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Are flat Destination and Location URLs worth the custom routing?I really appreciate you taking the time to explain all of this. Your replies have been very helpful and have cleared up a lot of things I wasn’t sure about.
The way you explained deriving the protected roots from wordpress itself, then checking post types, taxonomies and rewrite rules, makes a lot more sense than trying to maintain one big list by hand.
The point about a plugin being added later and claiming a root that an existing destination is already using was something I hadn’t thought about at all. A health check for that now seems like something I’d definitely want in the production version.
You’ve given me a much better idea of how this could be handled properly if I keep the flat url structure. I really appreciate you sharing your experience and taking the time to answer my questions!
Forum: Fixing WordPress
In reply to: Are flat Destination and Location URLs worth the custom routing?I appreciate the clarification. Deriving the WordPress-controlled roots and then adding the site-specific ones on top makes much more sense than maintaining one hardcoded list.
That also answers one of the questions I was trying to work through with the resolver. The resolver I’ve been testing used known roots such as
feed,search,pageandwp-json, but for production I can see why using the current$wp_rewritevalues andrest_get_url_prefix()would be much safer if WordPress or a plugin changes one of those bases later.I’ll keep the physical file/directory check you mentioned earlier as a separate layer as well. Your messages have been so helpful!
One thing I’m still unsure about is how you would handle root-level routes added by plugins or custom rewrite rules that aren’t exposed through the standard
$wp_rewritebase properties. Would you inspect the generated rewrite rules and derive the first path segment from them, or treat those as site/plugin-specific roots that need to be added separately?Forum: Fixing WordPress
In reply to: Are flat Destination and Location URLs worth the custom routing?I really appreciate this. The
wp_unique_post_slugand term-slug hooks look like a much cleaner way of handling the problem than letting the content publish and only withholding it from the resolver afterwards.It also explains something I saw in testing. A Destination using
feedwas automatically changed tofeed-2, whilesearch,pageandwp-jsoncould still be saved unchanged. Extending WordPress’s own slug checks for the additional protected roots sounds like the right direction, with an admin notice so the editor knows what happened.Your point about physical folders in the web root is something I hadn’t considered. I’ll add that to the production checks as well. Thank you for pointing this out.