Skip to content

Commit

Permalink
Add Nginx Redirects for Old Post URLs
Browse files Browse the repository at this point in the history
The original site did not nest posts under the `/post/` path & we've
seen some 404s come in from old links. This set of redirects should fix
those 404s.
  • Loading branch information
prikhi committed Jul 15, 2023
1 parent 59e50f6 commit 6dab0ea
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,9 @@ list has been trimmed down a bit, we'll actually migrate & deploy the site.
* General
* Haskell `manage.hs` script for running server & client watchers in one
terminal(see SESE website repo).
* Migration script from old django DB to new DB
* Clean shutdowns using signals
* Add `/health` route for docker health checks - should hit the DB. Write
custom production logger that ignores requests to the route.
* Blog Posts
* Paginated list route?
* Prev/Next links on details page
Expand Down
9 changes: 9 additions & 0 deletions deploy/nginx/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,15 @@ server {
set $api_server api;
proxy_pass http://$api_server:9001$1$is_args$args;
}

# Redirects for Old Post URLs
rewrite ^/setup-minecraft-mcmyadmin-on-slackware-141/?$ /post/setup-minecraft-mcmyadmin-on-slackware-141/ permanent;
rewrite ^/declarative-specifications-of-user-profiles-with-the-nix-package-manager/?$ /post/declarative-specifications-of-user-profiles-with-the-nix-package-manager/ permanent;
rewrite ^/using-selectizejs-autocompletes-with-django-ajax/?$ /post/using-selectizejs-autocompletes-with-django-ajax/ permanent;
rewrite ^/build-a-bootstrap-theme-from-a-vim-color-scheme/?$ /post/build-a-bootstrap-theme-from-a-vim-color-scheme/ permanent;
rewrite ^/adding-draft-approval-workflow-to-formidable-entries/?$ /post/adding-draft-approval-workflow-to-formidable-entries/ permanent;
rewrite ^/automatically-upgrading-a-sendy-instance/?$ /post/automatically-upgrading-a-sendy-instance/ permanent;
rewrite ^/custom-404-page-headway-wordpress/?$ /post/custom-404-page-headway-wordpress/ permanent;
}

server {
Expand Down

0 comments on commit 6dab0ea

Please sign in to comment.