Created
May 17, 2018 14:58
-
-
Save BenjaminBeck/9a41d73051bb82bb1a8cc5e9e7fafd26 to your computer and use it in GitHub Desktop.
dsgvo redirect
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RewriteEngine on | |
RewriteCond %{HTTP_COOKIE} !^.*cookieconsent_status=dismiss.*$ [NC] | |
RewriteCond %{HTTP_USER_AGENT} !^.*AltaVista.*$ | |
RewriteCond %{HTTP_USER_AGENT} !^.*Googlebot.*$ | |
RewriteCond %{HTTP_USER_AGENT} !^.*msnbot.*$ | |
RewriteCond %{HTTP_USER_AGENT} !^.*Slurp.*$ | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteCond %{REQUEST_FILENAME} !-l | |
RewriteBase / | |
RewriteRule .* test.html [L] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Title</title> | |
<script type="text/javascript" src="/typo3conf/ext/bdm_theme_bootstrap/Resources/Public/Vendor/jquery-1.12.2.min.js"></script> | |
<script> | |
function createCookie(name, value, days) { | |
var expires; | |
if (days) { | |
var date = new Date(); | |
date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000)); | |
expires = "; expires=" + date.toGMTString(); | |
} else { | |
expires = ""; | |
} | |
document.cookie = encodeURIComponent(name) + "=" + encodeURIComponent(value) + expires + "; path=/"; | |
} | |
$(function(){ | |
$('.ok-button').click(function(){ | |
createCookie('cookieconsent_status','dismiss',200); | |
window.location.reload(); | |
}) | |
}) | |
</script> | |
</head> | |
<body> | |
<a class="ok-button">OK</a> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment