summaryrefslogtreecommitdiff
path: root/http/index.php
diff options
context:
space:
mode:
authoremkael <emkael@tlen.pl>2018-02-02 19:41:22 +0100
committeremkael <emkael@tlen.pl>2018-02-02 19:41:22 +0100
commit52aa40b9b8764da2872385fb4ff4155874b28c57 (patch)
tree95bcd65d8f1ab7d0447e43d27f899ab204731fa4 /http/index.php
parent16a32604f5f2459418dd94f31de499990f0dfb69 (diff)
Treating GUID links as redirects
Diffstat (limited to 'http/index.php')
-rw-r--r--http/index.php7
1 files changed, 7 insertions, 0 deletions
diff --git a/http/index.php b/http/index.php
index e6474bd..ca9b6ba 100644
--- a/http/index.php
+++ b/http/index.php
@@ -7,6 +7,13 @@ if (!in_array($format, ['atom', 'rss'])) {
die('Invalid feed format.');
}
+$pathinfo = trim($_REQUEST['pathinfo'], '/');
+
+if (strlen($pathinfo)) {
+ header('Location: ' . $pathinfo, TRUE, 302);
+ die();
+}
+
$params = explode('/', $_REQUEST['query']);
if (count($params) < 2) {