Site Coding: Old Habits Can Cost Ya

Finally bit the bullet last night and changed Wordpress over to “pretty permalinks.” Had been dreading it for weeks- pictures of .htaccess problems and dead websites and days of frustration.

Instead, it went pretty smoothly. CHMOD the .htaccess file to “666″ (so Satan could write to it, I suppose), then change permalink structure in Wordpress options. Simple! [I’m not calling Wordpress Satan here, they rock. I’m just pointing out that Damian from The Omen would like some of Apache’s rules.]

Or not so simple. The links changed beautifully, everything stayed intact. Changed .htaccess back. But then, lo! All my images are gone!

From way back in my HTML 1.0 days, I’ve been in the habit of using relative links in my coding. It used to be a way to save bandwidth and cut down on image-borrowing. You know, back when you paid $50/month for bandwidth measured in megabytes.

Well, with the permalink structure in place, Wordpress only wants complete “http://…” references, so all my images were gone.

So, I spent an extra couple of hours last night (after I was already a Zombie) editing all my old posts and pages, changing the links to the images.

If you view a post or page and just get the “alt” description for an image and not the image itself, that’s probably one I missed.

But don’t blame me. Blame Satan.

 

3 Comments

  1. Michael said,

    October 20, 2006 @ 6:39 am

    hmm, I use relative links for my images and I’m using the pretty / cruft-free permalinks.

  2. Will said,

    October 20, 2006 @ 12:19 pm

    Michael,

    Thanks- your comment got me to digging around a little more. It appears that my problem has something to do with the fact that my images have been under my Wordpress “wp-content” directory in the hierarchy. Guess if I were to make an “images” folder in the main directory and relative-link to there, it’d probably work fine. Might give that a shot when I’ve got some time to burn. For the time being, guess I’ll just stick with the absolute links.

    ‘Preciate the visit!

  3. Will said,

    October 20, 2006 @ 12:23 pm

    … or even better: looks like I was missing a slash in the links! GOK why they were working before…. Doh!

RSS feed for comments on this post