How to GET URL from previous page and post it in the current page's URL