I know there are a lot of tricks for doing links, for example <a href="?query=string">
will link to the current page after appending the query string. Is there a way to link back to the current page, after removing the query string without just typing the file name?
Example, at the page foo.php?q=3
, I want to link to foo.php
. Is there a shortcut-type way to do this? The file will be renamed several times, so I don't want to type a bunch of links and then have to edit them later.
Edit: Even though these are PHP files, I'm trying to avoid a server-side solution for this particular problem.