All, I have the following code:
echo '<a href="register">Please try again</a>';
I'm using Wordpress and the register is a page that I created and based on how I created my permalinks this is a legit page. My issue is that this doesn't work correctly.
If I'm on the following URL:
http://localhost/wordpress/help-register
Then I click on that link my new URL will be: http://localhost/wordpress/help-register/register
However I want it to be: http://localhost/wordpress/register
Try this instead:
echo '<a href="' . get_site_url() . '/register">Please try again</a>';