summaryrefslogtreecommitdiff
path: root/http
diff options
context:
space:
mode:
Diffstat (limited to 'http')
-rw-r--r--http/.htaccess2
-rw-r--r--http/index.php7
2 files changed, 8 insertions, 1 deletions
diff --git a/http/.htaccess b/http/.htaccess
index e3378e5..47c993c 100644
--- a/http/.htaccess
+++ b/http/.htaccess
@@ -1,2 +1,2 @@
RewriteEngine On
-RewriteRule (.*)/(.*).xml /index.php?format=$2&query=$1
+RewriteRule (.*)/(.*).xml(/.*)? /index.php?format=$2&query=$1&pathinfo=$3
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) {