Since you are using a custom header, adding a small piece of JavaScript to the header file should help.
For example, below JS code in the custom header will modify the h1
tag (custom defined) to show the current URL.
<h1 id="path"></h1><script>document.getElementById("path").innerHTML = "Index of " + window.location.href;</script>