custom htaccess instead of generated (old host...) + small prod fixes

This commit is contained in:
2022-10-17 18:39:04 +02:00
parent 4fc86624dc
commit 80fcb43543
5 changed files with 390 additions and 135 deletions

View File

@@ -7,6 +7,7 @@ export default {
pathPrefix: config.pathPrefix,
trailingSlash: "always",
siteMetadata: {
siteUrl: config.url,
url: config.url,
menu: config.menu,
legalMenu: config.legalMenu,
@@ -190,52 +191,11 @@ export default {
},
},
},
{
resolve: "gatsby-plugin-htaccess",
options: {
www: true,
host: "www.rickvanlieshout.com",
https: true,
redirect: [
"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]",
],
},
},
"gatsby-plugin-image",
"gatsby-plugin-catch-links",
"gatsby-plugin-react-helmet",
"gatsby-plugin-optimize-svgs",
"gatsby-plugin-sass",
"gatsby-plugin-robots-txt",
],
};