ComboStrap Routing - Best Page Name Algorithm
This redirection algorithm performs always a not found redirection.
This algorithm should be in a low priority order because:
The redirection by best name page is an simple algorithm which occurs to find the best page by name.
It calculate a score for two kinds of page :
- the pages with the same name
- When a page have the same name (by default 4)
- When a page is a start page of a namespace (by default 3)
- When a namespace match (by default 5)
- The page asked : namespace1:namespace2:pagename
- We have one page with the same name : namespace1:pagename
- We have one startpage : namespace1:namespace2:start
- The score for the page with the same name is : 9 = 5 (because namespace1 is present in the asked page) + 4 (because the page name match)
- The score for the startpage is : 13 = 5 (because namespace1 is present in the asked page) + 5 (because namespace2 is present in the asked page) + 3 (because it's a start page)
In this case, the startpage is the redirect page because it have a highest score (13 against 9)