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 not redirecting to primary alias when tab-specific alias exists #3832

Conversation

skamphuis
Copy link
Contributor

@skamphuis skamphuis commented Jun 10, 2020

Summary

Redirects to default portal alias failed when custom tab alias was used.

Details

In AdvancedUrlRewriter, there already was a check to see if the current alias was a custom tab alias for any tab, but there was no check to see if the alias actually is a custom alias for the request tab. That's what has been added.
In the process, it turned out that stored procedure GetTabCustomAliases was not covering all use cases, so that needed a change too.

I have a site with 3 aliases:

  • bli.40fdev.me
  • bla.40fdev.me
  • ble.40fdev.me

bli is the default and the site is set to redirect. This works in 9.6.1

Then I created a page /zzz and gave it a custom url of /z on alias ble.40fdev.me
Now, the site is not redirecting from ble.40fdev.me to bli.40feev.me anymore, because there is a custom tab alias.

With the fix applied, ble.40fdev.me is redirected to bli, except for ble.40fdev.me/zzz

Fixes #2841

@bdukes bdukes changed the title Fix-2841 Fix not redirecting to primary alias when tab-specific alias exists Jun 16, 2020
Copy link
Contributor

@mitchelsellers mitchelsellers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested this appears to fix the issue

@mitchelsellers mitchelsellers merged commit d88230f into dnnsoftware:develop Jun 23, 2020
@skamphuis skamphuis deleted the feature/2841-fix-custom-tab-alias-bug branch November 23, 2022 10:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PortalAlias Settings Not Correctly Observed
4 participants