PortalAlias Settings Not Correctly Observed
See original GitHub issueDescription of bug
We just experienced this on the dnncommunity.org website. Basically, we installed under one URL, upgraded a couple of times, then added a new URL as primary and the original URL was still being used. From what I could tell, the first URL in the database was being used, despite a different domain name being specified as IsPrimary
and Site Alias Mapping Mode being set to Redirect.
IMPORTANT: If this is indeed a bug, it could have massive impacts on the ecosystem. Websites may be incorrectly serving out the wrong domain names and the website owners may not have any clue that it’s happening.
Steps to reproduce
List the steps to reproduce the behavior:
- Install DNN 9.1.1 and use a specific URL (e.g., domain1.org, and www.domain1.org)
- Upgrade to DNN 9.2.2
- Upgrade to DNN 9.3.2
- Add another domain, and set it to be the primary site alias now (e.g., domain2.org (primary), and www.domain2.org)
- View the website using the new URL/portal alias
Current result
Originally, it was redirecting to the correct primary URL, but a lot of time, it doesn’t.
Expected result
The primary URL should be used when the setting exists and a HTTP 301 redirect should be performed is Redirect is the mapping mode.
Additional context
We managed to fix this by deleting the original primary alias (that was no longer primary) and adding it to the end.
Screenshots
Affected version
- 9.3.2
- 9.3.1
- 9.2.2
- 9.2.1
- 9.2
- 9.1.1
- 9.1
- 9.0
Affected browser
- Chrome
- Firefox
- Safari
- Internet Explorer
- Edge
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:32 (28 by maintainers)
Top GitHub Comments
Thanks. I’ll be trying to do some more testing and submit a pull request this friday.
No, this is on a pure windows server, no CP involved. I “fixed” it by removing the portalalias and re-adding it