Fixing WordPress redirect loops and insecure links under HTTPS

March 9th, 2016

I tried to switch my blog over to HTTPS and encountered two problems:

  • My stylesheet broke because get_stylesheet_uri() (and other links) were yielding http:// links, which were blocked by the browser
  • Attempting to log in would produce a redirect loop

This was in spite of my database and config files *all* having https URLs, not http. Mysterious and upsetting.

The problem turned out to be that (as far as I can tell) my blog is run on a server behind an SSL-terminating proxy that speaks HTTP to the server. WordPress's is_ssl() function checks the value of $_SERVER['HTTPS'] to see if it is being accessed via HTTPS. WP then (apparently) writes URLs to match this instead of using the literal base URL (this seems stupid) and also generates redirects to try to match the base URL. Both of these cause the observed breakage.

My fix was to add $_SERVER['HTTPS'] = 'on' to my wp-config.

Fast, manual, incremental updating of WordPress

February 6th, 2008

WordPress recently released 2.3.3 as an urgent security fix for 2.3.2. Rather than wiping all non-configured files from my development site, extracting the replacement files from the tarball, and re-uploading said files by FTP, I used the fast and precise approach: Only upload changed files.

Read full entry »

It ain’t pretty, but it’s mine

April 25th, 2007
Screenshot of this post

I have finally joined the ranks of bloggers who have designed their own blog themes. Wheee.

At some point I'd like to go for membership in the My Blog Actually Looks Nice club, but that could be a little ways off.

Edit: Thanks to Russ for the snazzy header image!

Edit 2006-05-07: If you're looking at this blog using Internet Explorer, you'll notice I really don't give a crap. However, if Safari, Konquerer, or Opera users notice something wrong — let me know!

WordPress plugins I love

April 2nd, 2007

WordPress is nice, but some of the plugins I've installed really boost the user experience (and mine!) I thought I'd share what I've gathered.

Read full entry »

My first collaboration!

January 12th, 2007

A while back I wrote a very simple plugin for WordPress that would automatically insert Dublin Core metadata into the header of my blog posts. I released it under a free license (as version 0.2) with the hope that someone more proficient in WordPress than I would come along and build on my work. And someone did!

Read full entry »