How can I hide the hash value from the following link href in the address bar?
<a href="index.php#dev_name">
So it'll redirect me to a the index.php#dev_name
, but I want the address bar to only show index.php
How can I hide the hash value from the following link href in the address bar?
<a href="index.php#dev_name">
So it'll redirect me to a the index.php#dev_name
, but I want the address bar to only show index.php
You can use a Javascript onclick event. The browser will still show index.php
, but the onclick event will trigger first, and redirect the browser to the right page.
<a href="index.php" onclick="location.redirect('index.php#dev');">