Skip to content

Instantly share code, notes, and snippets.

@manuks
Last active August 29, 2015 14:06
Show Gist options
  • Save manuks/97e544fd67a790c50080 to your computer and use it in GitHub Desktop.
Save manuks/97e544fd67a790c50080 to your computer and use it in GitHub Desktop.
To hide project until is released
<?php
/*
.htaccess
RewriteEngine on
RewriteCond %{HTTP_COOKIE} !.*cover=1.*
RewriteCond %{REQUEST_URI} !^/cover.php
RewriteRule .* cover.php [R=302,L]
*/
header("X-Robots-Tag: noindex,nofollow");
if ($_COOKIE['cover'] == 1) {
header("Location: /");
exit;
}
session_start();
if ($_POST[$_SESSION['name']] === 'yetAn0ther!23'){
setcookie("cover", 1);
header("Location: /");
exit;
}
if (!$_SESSION['name']) {
$_SESSION['name'] = 'coverkey'.rand(5555, 8888);
}
?>
<form method="post" >
<input type=password name=<?php echo $_SESSION['name']; ?> >
</form>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment