Conversation
|
One issue that arose from this is that we can no longer distinguish between rewritten calls and those that did not use a rewritten path. This is a problem when the core is not at the root because the path will always point to the core but without indicating what app was being used in the first place.
The last request will now resolve to the root app which is not what was invoked in the first place. This is the result of It appears to be that there are only two ways to mitigate this problem:
Considering that all newer installs already use (2.) as the default this can severely simplify the configuration for these cases. For all other cases we can still fallback to the existing implementation (which is supported nonetheless!) which is more rigid but works with arbitrary setups. Requiring the core to be the root app for smart URL rewriting also greatly simplifies the whole logic by having to deal with only one case going forward. |
URL rewriting is a feature that causes quite some friction because it requires exact rules that must be adjusted whenever apps are added or removed. This forces users more often than not to reach out for help because their newly installed app is dysfunctional when the real reason is that the rewrite rules are simply outdated. Even tricks like predefining a set typical values falls short when custom directory names are being used.
Smart URL Rewriting
We can solve this issue by directing all rewritten requests to the core and take care of the application mapping ourselves. This requires that all apps are a direct or indirect child of a single app (“single root”) which allows us to require only a single rewrite rule while simultaneously avoiding any conflicts with other content on the same website.
Core at Root
Setup:
/./forum/.getPath()getPathInfo()/members-list//members-list//forum/board/2-default-forum//forum/board/2-default-forum/Core in a Subdirectory
Setup:
/./core/.getPath()getPathInfo()/core/members-list//core/core/members-list//board/2-default-forum//core/board/2-default-forum/