diff --git a/Website/Include/PHP/db.php b/Website/Include/PHP/db.php
index 886ca19..2f35219 100644
--- a/Website/Include/PHP/db.php
+++ b/Website/Include/PHP/db.php
@@ -1,4 +1,7 @@
connect_errno > 0) die('Unable to connect to database [' . $shortdb->connect_error . '] - Check dbsettings.php');
-?>
\ No newline at end of file
+
+ $redis = new Redis();
+ $redis->connect('127.0.0.1', 6379);
+?>
diff --git a/Website/index.php b/Website/index.php
index f551e15..5c2122b 100644
--- a/Website/index.php
+++ b/Website/index.php
@@ -12,8 +12,6 @@
$_SESSION['catch'] = $catchid.":".$catchVal;
require('Include/PHP/db.php');
- $redis = new Redis();
- $redis->connect('127.0.0.1', 6379);
function followLink($shortdb, $redis, $link){
$link = $shortdb->real_escape_string(strtolower(stripslashes(strip_tags($link))));
@@ -126,7 +124,7 @@