aboutsummaryrefslogtreecommitdiffstats
path: root/index.php
diff options
context:
space:
mode:
Diffstat (limited to 'index.php')
-rw-r--r--index.php9
1 files changed, 7 insertions, 2 deletions
diff --git a/index.php b/index.php
index 977ed35..8f6743b 100644
--- a/index.php
+++ b/index.php
@@ -54,7 +54,7 @@ Router::add('', function() {
#===============================================================================
# ROUTE: Feed
#===============================================================================
-Router::add('feed/(?:(page|post)/)?', function($param = NULL) {
+Router::add('feed/', function() {
require 'core/include/feed/main.php';
});
@@ -68,7 +68,7 @@ Router::add('search/', function() {
#===============================================================================
# REDIRECT: Feed (trailing slash)
#===============================================================================
-Router::addRedirect('feed(/(?:page|post))?', Application::getURL('feed$1/'));
+Router::addRedirect('feed', Application::getURL('feed/'));
#===============================================================================
# REDIRECT: Search (trailing slash)
@@ -81,6 +81,11 @@ Router::addRedirect('search', Application::getURL('search/'));
Router::addRedirect('favicon.ico', Application::getTemplateURL('rsrc/favicon.ico'));
#===============================================================================
+# BACKWARD COMPATIBILITY: Redirect to the new post feed URL
+#===============================================================================
+Router::addRedirect('feed/post/', Application::getURL('feed/'), 301);
+
+#===============================================================================
# Execute router and route requests
#===============================================================================
Router::execute(parse_url(HTTP::requestURI(), PHP_URL_PATH));