Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: improved NGINX route rewrite handling for '/home' and '/loading' #1566

Merged
merged 1 commit into from
Mar 6, 2024

Conversation

shauke
Copy link
Collaborator

@shauke shauke commented Jan 5, 2024

PR Type

[x] Bugfix

What Is the Current Behavior?

The fix for " trailing '/' in path results to a wrong multi channel configuration (#1553)" results in NGINX re-writting errors ("the rewritten URI has a zero length") for MULTI_CHANNEL configurations that use the default baseHref of / when accessing the root route with https://intershoppwa.azurewebsites.net instead of https://intershoppwa.azurewebsites.net/home.

In addition the canonical link element is not correctly generated at the root. The double // between the domain name and the home route can be interpreted by search enginesas a duplicate, and thus impact the SEO ranking of the website.

What Is the New Behavior?

The NGINX route rewrite handling for '/home' and '/loading' was improved to work with MULTI_CHANNEL configurations with and without the default baseHref of /.
The NGINX rewriting removes now all trailing slashes.
The NGINX rewriting prevents canonical links with doubled // between the domain name and the rest of the path.

Does this PR Introduce a Breaking Change?

[x] No

Other Information

AB#92520

@shauke shauke added this to the 5.1 milestone Jan 5, 2024
@shauke shauke self-assigned this Jan 5, 2024
* addresses issues with trailing slashes for MULTI_CHANNEL configurations without 'baseHref' (introduced with #1553)
* fix "the rewritten URI has a zero length" error in nginx multi channel handling
* prevents canonical links with doubled "/"(slash) between the domain name and the rest of the path
@shauke shauke force-pushed the bugfix/nginx_empty_redirect branch from 614862c to a804da4 Compare March 5, 2024 15:07
@shauke shauke changed the title fix: "the rewritten URI has a zero length" error in nginx multi channel handling fix: improved NGINX route rewrite handling for '/home' and '/loading' Mar 5, 2024
@shauke shauke marked this pull request as ready for review March 5, 2024 15:15
@shauke shauke requested a review from dhhyi March 5, 2024 15:16
dhhyi
dhhyi previously approved these changes Mar 5, 2024
@shauke shauke force-pushed the bugfix/nginx_empty_redirect branch from cc4d8b3 to a804da4 Compare March 6, 2024 09:43
@shauke shauke merged commit 75ee42f into develop Mar 6, 2024
40 checks passed
@shauke shauke deleted the bugfix/nginx_empty_redirect branch March 6, 2024 10:32
@shauke shauke added the bug Something isn't working label Mar 6, 2024
shauke added a commit that referenced this pull request Mar 7, 2024
…#1566)

* addresses issues with trailing slashes for MULTI_CHANNEL configurations without 'baseHref' (introduced with #1553)
* fix "the rewritten URI has a zero length" error in nginx multi channel handling
* prevents canonical links with doubled "/"(slash) between the domain name and the rest of the path
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants