Skip to content

Instantly share code, notes, and snippets.

@ianfabs
Last active September 18, 2018 18:15
Show Gist options
  • Save ianfabs/48102578a622ea85245206eea8baefb0 to your computer and use it in GitHub Desktop.
Save ianfabs/48102578a622ea85245206eea8baefb0 to your computer and use it in GitHub Desktop.
A simple, efficient, redirect page to hide directory content πŸ‘Œ Just slap this bad-boy into the directory you want to hide, then change the content of the META tag to the path you'd like to move to and BLAM - done 😁
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<meta name="redirect" content="./path/to/redirect/">
<title>304 Permanent Redirect</title>
</head>
<body>
<script defer>
window.open(document.querySelector("[name=redirect]").getAttribute("content"), "_self")
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment