summaryrefslogtreecommitdiff
path: root/header
diff options
context:
space:
mode:
authorroot2014-11-27 15:55:25 +0100
committerroot2014-11-27 15:55:25 +0100
commit4f923b809b4e38e0639e253f428fb6c4df03ee67 (patch)
tree20d9d9ad9dae0316dad27358b4239b6f18f80e87 /header
parent311ad398e06cd2eba270ea70ca5a326d03b490f9 (diff)
downloadtools.iamfabulous.de-4f923b809b4e38e0639e253f428fb6c4df03ee67.tar.gz
More structured + better UI
Diffstat (limited to 'header')
-rw-r--r--header/index.php16
-rw-r--r--header/robots.txt2
2 files changed, 13 insertions, 5 deletions
diff --git a/header/index.php b/header/index.php
index a41912a..b57643d 100644
--- a/header/index.php
+++ b/header/index.php
@@ -4,6 +4,13 @@ if ( isset($_REQUEST['url']) && $_REQUEST['url'] != "" )
$set = true;
else
$set = false;
+
+require '../tools/config.php';
+
+if ( $_SERVER["HTTP_HOST"] == "header.iamfabulous.de"){
+ header($_SERVER["SERVER_PROTOCOL"] . " 301 Moved Permanently");
+ header("Location: " . __domain_ . "/header/");
+}
?>
<!doctype html>
<html>
@@ -22,7 +29,7 @@ else
}
?>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
- <link rel='shortcut icon' href='../tools/favicon.ico' type='image/x-icon'>
+ <link rel='shortcut icon' href='<?php echo __domain_; ?>/tools/favicon.ico' type='image/x-icon'>
</head>
<body>
<?php require("../tools/navbar.php"); ?>
@@ -33,10 +40,9 @@ else
if ( $set ){
function getInfo($url, $method = "get", $customHeader = array()){
- $redis = new Redis();
- $redis ->connect("/var/run/redis/redis.sock");
- $redis->ping();
- $redis->select(9);
+ require '../tools/class/redis.php';
+
+ $redis = new Database(REDIS_CONNECT, 9);
$key = md5( $url . $method . serialize($customHeader) );
diff --git a/header/robots.txt b/header/robots.txt
new file mode 100644
index 0000000..1f53798
--- /dev/null
+++ b/header/robots.txt
@@ -0,0 +1,2 @@
+User-agent: *
+Disallow: /