Opened 13 years ago
Closed 13 years ago
#3771 closed defect (bug) (fixed)
Limit redirect cascading when canonicalizing URLs
Reported by: | boonebgorges | Owned by: | |
---|---|---|---|
Milestone: | 1.6 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Core | Keywords: | needs-patch |
Cc: |
Description
In r5313 we adopted a system that will redirect you to the most specific version of a URL possible, in order to avoid the current issue of duplicate URLs for the same content. However, the system currently in place can result in multiple redirects on a single request (as when you request example.com/members/boone -> example.com/members/boone/activity -> example.com/members/boone/activity/just-me). This results in a somewhat slower browsing experience.
If possible, the canonical URL endpoint should be determined on the server side, so that only one redirect is necessary. This should be possible by crawling bp_nav and bp_options_nav.
(In [5412]) Refactors URL canonicalization logic, moving it into the single bp_redirect_canonical() which is loaded from bp_core_load_template() instead of redirecting during the nav setup routine. See #1741. Combines all canonicalization into a single redirect. Fixes #3771. Ensures that query strings are preserved on redirects. Fixes #3777.