Tries to automatically set a canonical url for Path handler