blog

11 May 2022

new blog forwarding

by

Following the previous post for migrating blogs, it turns out it is very easy in apache to simply redirect a whole website:

<IfModule mod_rewrite.c>
RewriteEngine On

RewriteCond %{HTTP_HOST} ^strangeparty.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.strangeparty.com$
RewriteRule (.*)$ https://www.antonpiatek.dev/$1 [R=301,L]

</IfModule>

And now an old url, such as https://www.strangeparty.com/2016/08/22/now-with-added-ssl-fromletsencrypt/ will simply work on the new host as the pages are in the same location

tags: