When redirecting preserve anchors

This commit is contained in:
Kovid Goyal
2021-07-20 13:51:50 +05:30
parent 624991b9b7
commit d98c2f89aa
2 changed files with 8 additions and 3 deletions

View File

@@ -81,7 +81,12 @@ def add_old_redirects(loc: str) -> None:
<head>
<title>Redirecting...</title>
<link rel="canonical" href="{bname}/" />
<noscript>
<meta http-equiv="refresh" content="0;url={bname}/" />
</noscript>
<script type="text/javascript">
window.location.replace('./{bname}/' + window.location.hash);
</script>
</head>
<body>
<p>Redirecting, please wait...</p>