diff options
Diffstat (limited to 'vhosts/blog/nginx.conf')
| -rw-r--r-- | vhosts/blog/nginx.conf | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/vhosts/blog/nginx.conf b/vhosts/blog/nginx.conf index 7cc8bda1..eb1d9136 100644 --- a/vhosts/blog/nginx.conf +++ b/vhosts/blog/nginx.conf @@ -18,7 +18,10 @@ server { error_page 404 /404.html; - # Old URLs. + # Redirect to canonical path. + rewrite ^/posts/1/?$ /posts/ permanent; + + # Old URL patterns. rewrite ^/posts/(my-first-post)/?$ /posts/2021-03-05/$1/ permanent; rewrite ^/posts/(phperkaigi-2021)/?$ /posts/2021-03-30/$1/ permanent; rewrite ^/posts/(cpp-you-can-use-keywords-in-attributes)/?$ /posts/2021-10-02/$1/ permanent; @@ -33,5 +36,6 @@ server { # I mistakenly wrote 2023 in the URL instead of 2024. rewrite ^/posts/2023-01-10/(neovim-insert-namespace-declaration-to-empty-php-file)/?$ /posts/2024-01-10/$1/ permanent; + # Renamed posts. rewrite ^/posts/2024-03-20/todos-in-my-life/?$ /posts/2024-03-20/my-bucket-list/ permanent; } |
