[Pkg-owncloud-commits] [owncloud-doc] 07/09: Work properly with subdirs
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 b707401d442453c505c1e0f1744b2cb0dcc72f36
Author: Daniel Molkentin <daniel at molkentin.de>
Date: Mon Oct 21 20:11:45 2013 +0200
Work properly with subdirs
---
go.php | 17 +++++++++--------
1 file changed, 9 insertions(+), 8 deletions(-)
diff --git a/go.php b/go.php
index 72ca21a..d78276b 100644
--- a/go.php
+++ b/go.php
@@ -4,10 +4,10 @@
############## 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',
+ '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 #################
@@ -17,7 +17,7 @@ $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']);
+$path = dirname($_SERVER['REQUEST_URI']);
if (array_key_exists($from, $mapping)) {
$target = $mapping[$from];
@@ -25,7 +25,8 @@ if (array_key_exists($from, $mapping)) {
$target = '';
}
-$location = "$proto://$name$port/$path$target";
+$location = "$proto://$name$port$path$target";
+
+header('HTTP/1.1 302 Moved Temporarily');
+header('Location: '.$location);
-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