apache

Cleaning Up After Migrating To Drupal

We have just finished a migration job for a client of ours from an old .Net system in to Drupal, the last task of which was to write some Apache mod_rewrite conditions and rules to deal with the URLs of their old website. This proved to be more trouble than I thought, mainly because I struggled to find examples of how this might work.

Firstly, the ground work. The URL pattern to be redirected looked like this:

MainArticle.aspx?m=33818&amid=30301119

Rewriting URLs For SEO

Quick non-Drupal, but very useful, post here. There are lots of people talking about things like this on the 'net, but I've never found my specific requirements in one place. So here they are, in one place. I'm sure other UK web developers will need them!

This is about avoiding duplicate content by making sure that any requests to no sub domain (e.g. http://drupaler.co.uk) get permanently redirected to the correct sub domain (e.g. http://www.drupaler.co.uk). This way Google doesn't see duplicate content and we're like three little Fonzies, Drupal, Google and me.

IE7 And Apache File Type Gotcha

Firstly, thanks for Russ at Manta Ray Media for doing the Google leg-work on this one.

Apparently the new(ish) Microsoft Office .docx file extension (in fact, all the new .foox file extensions) is read by Internet Explorer 7/8 as a Zip file when being served by an Apache web server. This is because the sent headers from Apache are incomplete and IE gets confused and thinks it is receiving a zipped archive, not an Office document. (Isn't it wonderful that only Microsoft's browser gets confused by Microsoft's file formats!)

Apache2 On Fedora - Getting Rid Of The 403

Apache2 on the Fedora core (in my case Fedora 10) can be a fiddly beast. In fact, if you're a total Linux n00b I would say don't bother with the core Apache2 and MySQL - just install XAMPP, which gives you everything right out of the box. It is *not* secure but as long as we're talking about a fire-walled home computer here it is fine.

Nasty Apache 2 vhosts Gotcha

This is worth a blog post, as it took us a while to get to the root of the problem. We had a fresh installation of RedHat (RHEL 5, to be precise) which comes with Apache 2. I'm used to having a vhosts include for httpd.conf that looks something like this:

NameVirtualHost *:80


DocumentRoot "c:/xampplite/htdocs"
ServerName localhost

Options +Indexes
AllowOverride All
Allow from all


DocumentRoot "c:/projects/d6"

Syndicate content