Skip to content

Instantly share code, notes, and snippets.

@ryanlid
Created September 22, 2017 15:19
Show Gist options
  • Save ryanlid/48684db8344c190e92c4fa8adc7029a4 to your computer and use it in GitHub Desktop.
Save ryanlid/48684db8344c190e92c4fa8adc7029a4 to your computer and use it in GitHub Desktop.
启用HTTPS访问,禁用HTTP访问提示页
<!DOCTYPE html>
<html>
<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">
<title>The HTTP access had been disabled!</title>
</head>
<body>
<div>The access by HTTP had been disabled!</div>
<div>Pleace try to access by HTTPS.</div>
<div>👇</div>
<div id="go"></div>
<script>
var go = document.getElementById('go');
var url = '<a href="https://' + document.location.host + document.location.pathname +
'"> https://' + document.location.host + document.location.pathname + '</a>';
go.innerHTML = url;
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment