From 1f717c637c41df264bb522d2091a177fef1059db Mon Sep 17 00:00:00 2001 From: "max.mehl" Date: Thu, 22 Jun 2017 13:07:24 +0200 Subject: [PATCH] rewrite sign cgi URL --- site/layouts/partials/sign.html | 2 +- site/static/.htaccess | 13 ++++++++----- site/static/cgi/sign.php | 2 +- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/site/layouts/partials/sign.html b/site/layouts/partials/sign.html index 45f91de..6069f6f 100644 --- a/site/layouts/partials/sign.html +++ b/site/layouts/partials/sign.html @@ -7,7 +7,7 @@

{{ .Site.Params.sign.description | markdownify }}

-
+ diff --git a/site/static/.htaccess b/site/static/.htaccess index 8cfff3e..d50a93f 100644 --- a/site/static/.htaccess +++ b/site/static/.htaccess @@ -1,14 +1,17 @@ RewriteEngine On RewriteBase / +# Password-protect the site until it's released +AuthType Basic +AuthName "This website will be released soon. Please follow our news on fsfe.org to stay updated." +AuthUserFile /usr/share/blog/public/.htpasswd +Require valid-user + # Redirect 404 errors to nice page ErrorDocument 404 /404.html # Nicer URL for share buttons RewriteRule ^share/?$ /cgi/share.php [NC,L] -# Password-protect the site until it's released -AuthType Basic -AuthName "This website will be released soon. Please follow our news on fsfe.org to stay updated." -AuthUserFile /usr/share/blog/public/.htpasswd -Require valid-user +# Nicer URL for signing +RewriteRule ^sign/?$ /cgi/sign.php [NC,L] diff --git a/site/static/cgi/sign.php b/site/static/cgi/sign.php index ef928b9..9c062da 100644 --- a/site/static/cgi/sign.php +++ b/site/static/cgi/sign.php @@ -5,7 +5,7 @@ $timer_start = microtime(true); // Start counter for PHP execution time trackin $codemod = 2138367; // modificator with which the confirmation ID will be obfuscated $output = ""; -$selfurl = "https://publiccode.eu/cgi/sign.php"; // absolute URL of this PHP script +$selfurl = "https://publiccode.eu/sign"; // absolute URL of this PHP script $db = "/usr/share/blog/data/signatures/signatures.json"; // Signature database path $ipdb = "/usr/share/blog/data/signatures/ips.json"; // IP database path $spamdb = "/usr/share/blog/data/signatures/spammer_" . date('Y-m-d') . ".json"; // This day's potential spammer database