Added support for page ID at the end of the final URL segment