Amadiere.com

Fourteen and a half crazy frog burpers

24th January 2010

Blog posts redirecting to homepage

Filed under: Hosting,Wordpress — Tags: , — Alex Holt @ 3:30 pm

Over the last week or two, I hadn’t spotted but my blog posts were all redirecting to my homepage. This is due to my stupidity. Plain and simple. I didn’t check once the website had completed its move across hosting providers and the URL redirecting had failed.

However, it was fairly simple. When I visited the Permalink settings within WordPress, it came up with the following warning:

If your .htaccess file were writable, we could do this automatically, but it isn’t so these are the mod_rewrite rules you should have in your .htaccess file. Click in the field and press CTRL + a to select all.

To fix it, it was just as easy – do exactly as it says. I updated my .htaccess file to include the following text.

<IfModule mod_rewrite.c>
  RewriteEngine On
  RewriteBase /blog/
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule . /blog/index.php [L]
</IfModule>

This probably wouldn’t have been such an issue, but the change of hosting provider (from GoDaddy to NearlyFreeSpeech.net) was basically going from a Windows box to a Unix box.

28th June 2009

Changing Hosting Providers & IIS WordPress

Filed under: Hosting — Tags: , , — Alex Holt @ 10:08 am

There has been half a reason for the absence of articles of late, a change in hosting providers! I appreciate, that’s lousy and actually you’re not interested, nor did you probably even notice I’d been gone – but what the heck, I’m back :)

For years, probably 6, I’ve been with PowWeb who were OK, but as renewal time came around – I was starting to think twice about paying the 2 years up front, when I could limit the period down a little bit. With the credit crunch and all this recession lark – it seemed a logical idea to control my cash flow. So I took a day off work, did a bunch of research and eventually concluded that GoDaddy’s Grid hosting, currently in beta, looked like a good alternative. So I prepared for the move.

I’ve never moved a website before without the support of people who know DNS way better than I do, so this was going to be a bumpy ride. However, making sure that I did as much as I could, I dumped the database, got a zipped up backup of the filesystem and did an extract straight from WordPress and prepared for the inevitable feeling of foreboding.

Things were messy when I realised that to move a domain name, it has to have been at the current provider for more than 60 days. I think when my hosting ran out it was about 55 days. I’m not sure why, nor am I altogether worried by it – but my email stayed working for almost all that five day period, though my website (unpaid) continued for maybe a day (probably due to it expiring on a Sunday). I thought about re-pointing my name-servers for Amadiere.com to GoDaddy’s, but the FAQs weren’t as helpful as they might be – so I gave up pretty promptish and decided I’d have a period of deadness.

The period of inactivity proved useful, as the hosting package I chose included IIS7, PHP5, ASP.NET 3.5, MySQL and MSSQL – so stuff to play around with while I waited. Eventually, everything went well and my site was up and running with my email being down for about 2-3 hours (all said and done, a minor miracle actually). I had a pickle with the Name-Servers on the way, but a quick call to GoDaddy tech support (which I expected to be tosh – but were actually fab, helpful and friendly), that was quickly resolved.

So the move went perfectly?… not quite.

GoDaddy’s hosting isn’t perfect for my liking. You have access only to your webroot, not a folder directly up from your webroot. When I tried to create blog.amadiere.com, this meant I had to create a directory within my webroot for the blog too – something that wasn’t the case at PowWeb. However, the big pickle came when I tried setting up Permalinks on IIS7 and PHP5 for WordPress. Jeez Louise! That’s a mother of a bitch! Basically, saying Permalinks, IIS and GoDaddy Subdomains don’t see eye-to-eye is somewhat an understatement. There is an excellent solution that works for most cases, but it assumes you can set the 404 page for each of your domains – another flaw in the GoDaddy subdomain implementation means your hosting account only has one 404 page – irregardless of the number of (sub) domains you have. I literally couldn’t find an ideal way around this, other than to use my main domain name and drop the blog prefix and add it as a suffix instead.

This means that all my URLs are goosed. Again. I almost feel ashamed that I’ve been here before and yet here I am again. None-the-less, it’s not totally bad. The blog subdomain homepage does still work, but all the links now point to their www counterpart but don’t exist on blog.

The pain suffered through this process is exhausting, but there is light and I’m happy. Hopefully I’ll like GoDaddy and won’t have to do that for at least long enough for me to forget how painful it actually was!…

I think I’m gonna bill the new domain name as a strategic re-branding to harness the dynamic synergy of Web 2.0: http://www.amadiere.com/blog/ ;) I guess it’s time for me to actually brand the site somehow, instead of using all the downloadable themes…

9th May 2009

Changing WordPress Permalinks

Filed under: Wordpress — Tags: , — Alex Holt @ 3:29 pm

I didn’t think enough at the start, that’s the bottom line here.

I set up my blog and just had a little wander through the settings, not really examining them like I normally would do when I get a new toy. This is how I missed the settings for permalinks or at least I saw it, but paid it too little attention. When I eventually did decide I didn’t like this layout of URLs (/archives/%post_id%), it was too late.

I basically came to the decision to change them when looking at Google Analytics and the following was part of my report.

Wow, post 41, ooh yeah. A sweet, sweet day.... remind me what it was again?

Wow, post 41, ooh yeah. A sweet, sweet day.... remind me what it was again?

I was reviewing the most popular pages and I realised I had no idea what post 41 was. Absolutely no idea! So it was then it hit me – that archive permalink naming schema-thingy, it’s a bit, ya know, poop. But behold! I could change that! I’d alter the URLs so instead of this useless URL with a number in it, I’d change it and make it fantastic and include the URL-friendly post title as part of the Permalink.

There was much rejoicing!

So, I changed them – and the obvious happened. All my old links broke and became 404′s – losing all inbound Google traffic.

I decided I could live with that. I’m a grown man! What’s a 404 here and there, pffft! Google would update itself, right? It wouldn’t take long, surely…. But alas, it was a lie to myself as it was pecking at my head every time I thought about it. So eventually (today – after something like 3-4 weeks), I decided to do something about it. I thought that I would have to dig around with .htaccess files and MOD_REWRITE rules, something I am not masochistic enough to indulge in just yet. But, alas, a search around the Internet solved my problem!

I stumbled upon Dean Lee’s Permalink Migration Plug-in for WordPress. Genius! You can simply search for it in the plugins area of your blogs admin and install it simply from that route. It’s done what I needed exactly and it behaves how I wanted exactly!

After installing, I simply told it what my old links were clicked save and…. and…. oh. No change. My permalinks were already setup, so why wasn’t this working. I decided what I’d do is re-save my permalinks settings page and delete cache to see if that made a difference – I maybe should have checked after each one – but either way – one of them fixed it for me and now all my old links work again! :)

Old: http://blog.amadiere.com/archives/56
New: http://amadiere.com/blog/56/calculating-the-date-of-easter-programatically

Yes, that music you hear is the angelic chorus declaring the fantasticness of my links! :)

The best thing about this plug-in (other than not needing to delve into MOD_REWRITE), is that it redirects to the new URL instead of pretending the old one was fine. Well done, Dean Lee – take a bow!

So the bottom line is. Choose your permalinks wisely – they should be helpful enough that you can work out the content of the page from reading it, while at the same time being very nice to Google (and the other search engines…). I’m lucky because my blog isn’t popular – no one really noticed. But there were people hitting these 404′s who maybe could have done with some of the info in the posts.

Theme designed & built for Amadiere.com by Alex Holt. Powered by WordPress