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.
A query string is a part of a uniform resource locator (URL) that assigns values to specified parameters.
href="?"
Not exactly what you are after - there's still a question mark at the end - but functionally equivalent.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With