htmlhrefrelative-url

HTML: Relative Link without Parameters


I have a page name index.php. It is in the folder name test. So if I call localhost/test I can see the page.

I have links in the page that pass parameters:

<a href="?id=1">Link1</a>
<a href="?id=2">Link2</a>

So the URL is localhost/test/?id=1

After that I want to link to the root page (index.php) but I don't want to use href="index.php". I want a link for root page without parameters. So when the user click the link, he/she can go to localhost/test again.

Is there any standard or something?


Solution

  • The "../test" solved my problem.