git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@577
b3834d28-1941-0410-a4f8-
b48e95affb8f
*/
$url_redir = 'http://www.google.com/url?sa=D&q=';
+/**
+ * Enable short URL service.
+ * Can be used to visit urls using http://example.org/go/shortname
+ *
+ * @var boolean
+ */
+$shorturl = true;
+
/**
* Array of bookmark extensions that Scuttle should add system tags for.
* When adding an URL with one of the given extensions, a system
*/
require_once '../src/SemanticScuttle/header.php';
+if (!$GLOBALS['shorturl']) {
+ header('HTTP/1.0 500 Internal Server Error');
+ header('Content-Type: text/plain');
+ echo 'Short URL service deactivated';
+ exit();
+}
+
if (!isset($_SERVER['PATH_INFO'])) {
header('HTTP/1.0 400 Bad Request');
header('Content-Type: text/plain');