[my][home][toon]
previously known as [cold][wet][durham], [dirty][grimy][london],[busy][shiny][toon],[frantic][crowded][south]

.htaccess redirects

January 31st 2008 in blog, technology

Looking though the logs for this place tonight I noticed how many people are going to old URLs which haven’t been active for months, years in some cases. 500 people a month were accessing www.coldclimate.co.uk/blog, which I retired about a year ago. Another 500 people were munching down on 2 of my homebrewed feeds www.coldclimate.co.uk/1.xml and /blog/feed.xml, neither of which have been around for about a year minmum. Throw in another few links and suddenly 1000 more pages are actually being served each month.

So I’ve added a couple of lines to my htacess file to redirect people. It’s dead simple really, add a line like “Redirect oldplace http://wwww.newplace.com/new” and any traffic that comes to /oldplace gets redirected. You have to fully qualify the new place however. Also, you htaccess file is parsed top down, you redirect /oldplace http://www.newplace.com and then in the line below redirect oldplace/really_old http://www.someotherplace.com then any traffic for oldplace/really_old will actually end up at http://www.newplace.com, not www.someotherplace.com.

As that explaination probably made as much sense as Northern Rock shares, I’d recommend this comprehencive yet easy to understand guide to htaccess. Also rememeber that htaccess can really bugger you up too

Lord knows who was visiting these long dead pages, and I suspect most of it is feed readers blindly grabbing my 404 page and not realising it, but hey, if I’ve suddenly reappeared on your radar, I’ve not been gone, honest. You may thank .htaccess’s wonderful Redirect command.

Possibly Related Posts:



One comment to...
“.htaccess redirects”
Avatar
la

Or silly people who’ve just forgotten to remove the old link from the bookmarks *blush*




required



required - won't be displayed


Your Comment:

Here’s one of those crazy facts, which makes perfect sense to ecomonist, and mystifies the rest of us.

EMI pays £25m a year to scrap unsold CDs, yes £25 million.  They pay to make them, and then they pay to scrap them.  If ever there was a motivator to move to a digital distrobution method, this [...]

Previous Entry

Pies are deeply unfashional at the moment it seems, with chavs munching down (and silencing their offspring) with Gregs Dummies, and every Food Nazi from Queen Gillian McKeith downwards loathing their fat laden fillings and pastry topping, so I was quite proud of Jamie Oliver when he set about making a beef and cheese pie [...]

Next Entry