[Pkg-owncloud-commits] [owncloud-doc] 06/09: Add a redirector script

David Prévot taffit at alioth.debian.org
Wed Oct 23 21:47:37 UTC 2013


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch dfsg_clean
in repository owncloud-doc.

commit 303abc1c8b416c21ac873f75bf970847b7a4698b
Author: Daniel Molkentin <daniel at molkentin.de>
Date:   Mon Oct 21 19:46:56 2013 +0200

    Add a redirector script
---
 go.php |   31 +++++++++++++++++++++++++++++++
 1 file changed, 31 insertions(+)

diff --git a/go.php b/go.php
new file mode 100644
index 0000000..72ca21a
--- /dev/null
+++ b/go.php
@@ -0,0 +1,31 @@
+<?php
+
+############## Add new references here  ##################
+############## Adjust when editing docs ##################
+
+$mapping = array(
+               'ldap' => 'admin_manual/auth_ldap.html',
+               'dir_permissions' => 'admin_manual/installation/installation_source.html#set-the-directory-permissions',
+               'source_install' => 'admin_manual/installation/installation_source.html',
+               'install' => 'admin_manual/installation.html',
+           );
+
+############# Do not edit below this line #################
+
+$from = $_GET['to'];
+$proto = isset($_SERVER['HTTPS']) ? 'https' : 'http';
+$port = $_SERVER['SERVER_PORT'];
+$port = ($port !== '80' && $port !== '443') ? ":$port" : '';
+$name = $_SERVER['SERVER_NAME'];
+$path = dirname($_SERVER['PATH_INFO']);
+
+if (array_key_exists($from, $mapping)) {
+    $target = $mapping[$from];
+} else {
+    $target = '';
+}
+
+$location = "$proto://$name$port/$path$target";
+
+header ('HTTP/1.1 302 Moved Temporarily');
+header ('Location: '.$location);

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud-doc.git



More information about the Pkg-owncloud-commits mailing list