Skip to content
This repository has been archived by the owner on Jun 16, 2022. It is now read-only.

301 redirect but blank page #199

Open
etharion opened this issue Mar 4, 2019 · 1 comment
Open

301 redirect but blank page #199

etharion opened this issue Mar 4, 2019 · 1 comment

Comments

@etharion
Copy link

etharion commented Mar 4, 2019

Url tracker v 3.15
Umbraco v7.12.1

We have a bunch of URL's that returns a 301 and blank page. At first we thought it should have returned a 404, since we couldnt find it in the Url tracker tab in Umbraco. After using the SQL query from method LoadUrlTrackerMatchesFromDatabase we found a result in the database. See attached.
image

Problem here is that the 'redirectnodeid' = 0, but theres a valid url on the 'redirecturl'
What I added to make our redirects work was: && result.RedirectNodeId > 0
to line 455 in UrlTrackerModule.cs.
Since the check only checks if 'redirectnodeid' has a value.

@etharion
Copy link
Author

etharion commented Mar 4, 2019

In addition to above, I found that line 265 need the '&& result.RedirectNodeId > 0' addition to the check too

EDIT:
I removed my extra check from line 265 again and updated the SQL query at line 256 instead. I added this part: (OldRegex IS NOT NULL AND OldRegex != '' )
Whole SQL query: "SELECT * FROM icUrlTracker WHERE Is404 = 0 AND ForceRedirect = @forceRedirect AND (RedirectRootNodeId = @redirectRootNodeId OR RedirectRootNodeId = -1) AND (OldRegex IS NOT NULL AND OldRegex != '' ) ORDER BY Inserted DESC"

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant