Oops I Did It Again

For the third time in the twelve year history of this blog, I’ve moved the site URL to a new one. Originally this blog started under www.abaltazar.org, then switched to www.rubyninja.org, now www.antoniobaltazar.com/blog/ is its permanent home. The primary reason for this new switch is because I’m consolidating my webapps into fewer domains as possible. The actual config changes made to WordPress for the URL move was overall a relatively pain free process.

1. Update database

UPDATE wp_options SET option_value=’http://www.antoniobaltazar.com/blog’ WHERE option_name=’siteurl’;
UPDATE wp_options SET option_value=’http://www.antoniobaltazar.com/blog’ WHERE option_name=’home’;

2. Update .htaccess

RewriteEngine On
RewriteBase /blog/
RewriteRule ^index\.php$ – [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} !=/server-status
RewriteCond %{REQUEST_URI} !=/server-info
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /blog/index.php [L]

3. Update Varnish vcl config vlc_recv() to handle all old redirects;

if (req.http.host ~ “(?i)^(www.)?rubyninja\.(org|net)”) {
set req.http.host = “www.antoniobaltazar.com”;
set req.backend_hint = antoniobaltazar;
return (synth(750, “http://” + req.http.host + “/blog” + req.url));

The old rubyninja.org domain will continue to function as my primary domain used on my homelab server architecture.

Leave a Reply

Your email address will not be published. Required fields are marked *