rewrite sign cgi URL

lektura
max.mehl 2017-06-22 13:07:24 +02:00
parent 8a8d035b3a
commit 1f717c637c
3 changed files with 10 additions and 7 deletions

View File

@ -7,7 +7,7 @@
<hr class="light">
<p class="text-faded">{{ .Site.Params.sign.description | markdownify }}</p>
<form action="/cgi/sign.php" method="post">
<form action="/sign" method="post">
<label class="sign-input form-na">
<input name="name" placeholder="{{ .Site.Params.sign.formName }}" type="text" required />
</label>

View File

@ -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]

View File

@ -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