Posted 15 Apr 2014.

Here’s a simple redirect in nginx:

server {
    listen 80;
    server_name tibidat.com;
    return 303 $scheme://blog.tibidat.com$request_uri;
}

Minimalistic and very readable. Note the usage of a 303; this means I don’t have to worry about clients with cached 301s should I decide to change the redirect target at a later time.