Added redirects (htaccess + cloudflare)

- fixed some blog content
- added todos
- fixed rss redirect
- moved to "trailingSlash always" in accordance with newest Gatsby spec
This commit is contained in:
2022-10-17 17:11:55 +02:00
parent 1541303669
commit 6531c9b2b3
14 changed files with 84 additions and 10 deletions

View File

@@ -5,6 +5,7 @@ import * as types from "./internal/gatsby/types";
export default {
pathPrefix: config.pathPrefix,
trailingSlash: "always",
siteMetadata: {
url: config.url,
menu: config.menu,
@@ -196,7 +197,37 @@ export default {
host: "www.rickvanlieshout.com",
https: true,
redirect: [
"RewriteRule ^/?home/(.*)$ //$1 [L,R=301]",
"RewriteRule ^/?home/(.*)$ /$1 [L,R=301]",
"RewriteRule ^/?cookies/(.*)$ /pages/legal/cookies$1 [L,R=301]",
"RewriteRule ^/?disclaimer/(.*)$ /pages/legal/disclaimer$1 [L,R=301]",
"RewriteRule ^/?contact/(.*)$ /pages/contact$1 [L,R=301]",
"RewriteRule ^/?resume/(.*)$ /pages/resume$1 [L,R=301]",
"RewriteRule ^/?about/(.*)$ /pages/about$1 [L,R=301]",
"RewriteRule ^/?blog/My_brand_new_blog/(.*)$ /posts/2014/my-brand-new-blog/$1 [L,R=301]",
"RewriteRule ^/?blog/Raspberry_pi_cluster_the_parts/(.*)$ /posts/2014/pi-cluster-1-shopping/$1 [L,R=301]",
"RewriteRule ^/?blog/Raspberry_pi_cluster_the_build/(.*)$ /posts/2014/pi-cluster-2-the-build/$1 [L,R=301]",
"RewriteRule ^/?blog/Raspberry_pi_cluster_installing_the_os/(.*)$ /posts/2014/pi-cluster-3-installing-the-os/$1 [L,R=301]",
"RewriteRule ^/?blog/Raspberry_pi_cluster_setting_up_the_master_node/(.*)$ /posts/2014/pi-cluster-4-setting-up-the-master-node/$1 [L,R=301]",
"RewriteRule ^/?blog/Raspberry_pi_cluster_expanding_the_cluster/(.*)$ /posts/2014/pi-cluster-5-expanding-the-cluster/$1 [L,R=301]",
"RewriteRule ^/?blog/Using_the_cluster_for_home_automation/(.*)$ /posts/2014/using-the-cluster-for-home-automation/$1 [L,R=301]",
"RewriteRule ^/?blog/Shellshock_dont_get_your_panties_in_a_bunch/(.*)$ /posts/2014/shellshock-why-you-shouldnt-get-your-panties-in-a-bunch/$1 [L,R=301]",
"RewriteRule ^/?blog/Me_my_blog_and_projects/(.*)$ /posts/2014/me-my-blog-and-projects/$1 [L,R=301]",
"RewriteRule ^/?blog/status_update/(.*)$ /posts/2014/a-status-update/$1 [L,R=301]",
"RewriteRule ^/?blog/new_look_new_comments_new_everything/(.*)$ /posts/2015/new-look-new-comments-new-everything/$1 [L,R=301]",
"RewriteRule ^/?blog/what_ive_been_doing posts/2015/what-ive-been-doing/$1 [L,R=301]",
"RewriteRule ^/?blog/raspberry_pi_screen/(.*)$ /posts/2015/raspberry-pi-screen/$1 [L,R=301]",
"RewriteRule ^/?blog/making_things/(.*)$ /posts/2015/making-things/$1 [L,R=301]",
"RewriteRule ^/?blog/TekTree-part-1/(.*)$ /posts/2015/tektree-part-1-a-christmas-surprise/$1 [L,R=301]",
"RewriteRule ^/?blog/TekTree-part-2/(.*)$ /posts/2015/tektree-part-2-lasercutting/$1 [L,R=301]",
"RewriteRule ^/?blog/TekTree-part-3/(.*)$ /posts/2015/tektree-part-3-wiring/$1 [L,R=301]",
"RewriteRule ^/?blog/TekTree-part-4/(.*)$ /posts/2015/tektree-part-4-programming/$1 [L,R=301]",
"RewriteRule ^/?blog/my-extended-leave/(.*)$ /posts/2016/extended-leave-status-updates-and-other-stuff/$1 [L,R=301]",
"RewriteRule ^/?blog/slsw-day0/(.*)$ /posts/2017/scala-day-0-what-is-scala/$1 [L,R=301]",
"RewriteRule ^/?blog/slsw-day1/(.*)$ /posts/2017/scala-day-1-the-basics/$1 [L,R=301]",
"RewriteRule ^/?blog/slsw-day2/(.*)$ /posts/2017/scala-day-2-lets-get-functional/$1 [L,R=301]",
"RewriteRule ^/?blog/slsw-day3/(.*)$ /posts/2017/scala-day-3-concurrency-is-key/$1 [L,R=301]",
"RewriteRule ^/?blog/slsw-day4/(.*)$ /posts/2017/scala-day-4-a-challenge/$1 [L,R=301]",
"RewriteRule ^/?blog/keep-a-sata-port-available/(.*)$ /posts/2017/keep-a-sata-port-available/$1 [L,R=301]",
"RewriteRule ^/?old/(.*)$ /new/$1 [L,R=301]",
],
},