From a7a17220e83fd85963bb9f5ee2faa17f84e454f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20K=C3=A4rner?= Date: Wed, 10 Jun 2020 15:44:47 +0200 Subject: [PATCH] Prevent duplicate names in URLs like /archive/archive/2020 or /tag/tag/example-tag MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Robert Kärner --- Configuration/Routes/BlogArchive.yaml | 8 ++++---- Configuration/Routes/BlogAuthorPosts.yaml | 4 ++-- Configuration/Routes/BlogCategory.yaml | 4 ++-- Configuration/Routes/BlogTag.yaml | 4 ++-- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Configuration/Routes/BlogArchive.yaml b/Configuration/Routes/BlogArchive.yaml index e6db15d0..e96877e8 100644 --- a/Configuration/Routes/BlogArchive.yaml +++ b/Configuration/Routes/BlogArchive.yaml @@ -5,24 +5,24 @@ routeEnhancers: plugin: Archive routes: - - routePath: '/archive/{year}' + routePath: '/{year}' _controller: 'Post::listPostsByDate' _arguments: year: year - - routePath: '/archive/{year}/page-{page}' + routePath: '/{year}/page-{page}' _controller: 'Post::listPostsByDate' _arguments: year: year page: '@widget_0/currentPage' - - routePath: '/archive/{year}/{month}' + routePath: '/{year}/{month}' _controller: 'Post::listPostsByDate' _arguments: year: year month: month - - routePath: '/archive/{year}/{month}/page-{page}' + routePath: '/{year}/{month}/page-{page}' _controller: 'Post::listPostsByDate' _arguments: year: year diff --git a/Configuration/Routes/BlogAuthorPosts.yaml b/Configuration/Routes/BlogAuthorPosts.yaml index 8a8644b9..18c860b2 100644 --- a/Configuration/Routes/BlogAuthorPosts.yaml +++ b/Configuration/Routes/BlogAuthorPosts.yaml @@ -5,12 +5,12 @@ routeEnhancers: plugin: AuthorPosts routes: - - routePath: '/author/{author_title}' + routePath: '/{author_title}' _controller: 'Post::listPostsByAuthor' _arguments: author_title: author - - routePath: '/author/{author_title}/page-{page}' + routePath: '/{author_title}/page-{page}' _controller: 'Post::listPostsByAuthor' _arguments: author_title: author diff --git a/Configuration/Routes/BlogCategory.yaml b/Configuration/Routes/BlogCategory.yaml index bf5c50ea..12efc1d4 100644 --- a/Configuration/Routes/BlogCategory.yaml +++ b/Configuration/Routes/BlogCategory.yaml @@ -5,12 +5,12 @@ routeEnhancers: plugin: Category routes: - - routePath: '/category/{category_title}' + routePath: '/{category_title}' _controller: 'Post::listPostsByCategory' _arguments: category_title: category - - routePath: '/category/{category_title}/page-{page}' + routePath: '/{category_title}/page-{page}' _controller: 'Post::listPostsByCategory' _arguments: category_title: category diff --git a/Configuration/Routes/BlogTag.yaml b/Configuration/Routes/BlogTag.yaml index 62b4ca1b..6ce2cfcb 100644 --- a/Configuration/Routes/BlogTag.yaml +++ b/Configuration/Routes/BlogTag.yaml @@ -5,12 +5,12 @@ routeEnhancers: plugin: Tag routes: - - routePath: '/tag/{tag_title}' + routePath: '/{tag_title}' _controller: 'Post::listPostsByTag' _arguments: tag_title: tag - - routePath: '/tag/{tag_title}/page-{page}' + routePath: '/{tag_title}/page-{page}' _controller: 'Post::listPostsByTag' _arguments: tag_title: tag