pageHandler method

added path parsing