Nov

25

A Bridge Too Far: Simple Redirects

No new work on the blog today. Boo.

Unless you count spending half an hour trying again to get pocketuniverse.ca to redirect to www.pocketuniverse.ca. Django only does the redirect when it's in the mood, so I tried adding an Apache rule. Thus enters (dramatic music) mod_rewrite, slinking its way in, complicating the simple, and confounding the brilliant.

This is in my virtual host for pocketuniverse.ca (with a ServerAlias to www.pocketuniverse.ca). Does it make any sense? (contact email = my first name at this domain name)

  RewriteCond %{HTTP_HOST}   !^www.pocketuniverse.ca [NC]
RewriteCond %{HTTP_HOST} !^$
RewriteRule ^/(.*) http://www.pocketuniverse.ca/$1 [L,R]

Oh yeah. I did get one other thing set up: Google Analytics. It's set to track traffic to pocketuniverse.ca, so I should see at least some of you guys as you come in.

Update:
I got it working. You know what helped?

  RewriteEngine on

Hi there, every time i used to check blog posts here in the early hours in the morning, as i like to find out more and more.

networksolutions.com (October 22, 2018 at 6:30 p.m.)