Refactoring some reused code into a method (inside of the routes
mapper) and adding a constant for all the possible scopes.
Merge pull request #10101 from wangjohn/refactoring_routing_mapper

Refactoring some reused code into a method (inside of the routes mapper)