Cricalix.Net

March 29, 2005

Fun with mod_rewrite

Filed under: $work, Technology — cricalix @ 16:46

In an effort to make the software that I write for $dayjob a bit more pleasing on the eye URL-wise, I started converting my code to use what is commonly called SEF (Search Engine Friendly) URLs. Not that a search engine will ever hit the administrative interface mind you. I decided to use Apache’s mod_rewrite functionality to achieve this, translating the ‘clean’ URLs into the URLs that my code expects.

I tested it for several days on my Gentoo / Apache 2 / PHP 5 development box, and all was well. The only odd thing was that a URL that looked like
http://www.example.com/settings/level/item
required a rewrite rule that looked like
RewriteRule ^settings.php/(\w+)/(\w+)$ settings.php?level=$1&item=$2.
Very peculiar. So today I uploaded the new code, added the mod_rewrite module to the installed Apache engine and poked it. “Page not found.”

Poked around, and around, and around. First thing of note was that the deployed server didn’t need .php in the middle of the match string. I should point out here that the deployed server is Apache 1.3, so there’s probably some major differences between the development and deployment platforms :) (Development platform being my personal laptop due to monetary issues when the company started.)

Second thing of note is that Apache’s mod_rewrite doesn’t use PCRE. I’ve checked the documentation, and unless I’m blind (which may be possible at a meta-physical level), the docs don’t state this . At all. A random page in a Google search revealed this to me. So, after going “Oh!”, I was able to rewrite my rules to something like
RewriteRule ^settings(.php)?/([a-z_\.-]+)/([a-z_\.-]+)$ settings.php?level=$2&item=$3,
and now have a rewrite ruleset that works on both servers with no changes.

March 27, 2005

The Book of Postfix

Filed under: Reviews — cricalix @ 16:51

As a sort-of long time Postfix user/administrator, I was quite eager to get my hands on The Book of Postfix. It’s written by two of the more active and knowledgeable admins on the Postfix users mailing list, and should thus be a good read. I’m by no means a wizard at administering Postfix, but hopefully I can glean some useful knowledge from the book and increase my knowledge.

I placed my order on Tuesday, via Amazon.co.uk, and it arrived Thursday - nice turnaround time (not that England is that big of a country).

So, how good is it? Very. I’ve already fixed my TLS setup so that the two MXs I run have the CA certs etc required to prove that they are who they say they are. I’ve also tweaked my SMTP rejection parameters based on Chapter 8 to be a bit more efficient in terms of resource use.

The book covers everything from basic setup of a server that can receive mail for a domain to a server that can talk to MySQL, LDAP and more, while visiting anti-spam restrictions and things like content-filters (think SpamAssassin / anti-virus). Well worth what I paid, and definitely recommended to any Postfix administrator. The authors are already planning a second edition to fix any blips that made it through into edition 1 (and there are one or two I’ve seen so far, and reported back), and update the coverage for the newest version of Postfix (2.2) that went GA after the book went to the printers.

March 26, 2005

Memories. Remembering.

Filed under: 42 — cricalix @ 9:53

I remember the view of the ocean from the back of the garden. I remember the smell of the ocean, fresh from Africa. I remember sitting on Mother Frog rock, trying to catch fish. I think I caught a wrasse. I remember wading out with Gary and his father on the reef to a deep ocean hole. I remember being scared that a stonefish might sting me. I have memories. Memories of hitting golf balls from our front lawn, seeing how far into the Forest I could get the ball to go. Memories of a Christmas Party at the Yacht Club, when Mum was sick and I got someone elses toy - and I didn’t like it at all. Memories of body-boarding in the bay, dodging the rocks by the pier.
(more…)

March 24, 2005

Cooking with VoIP

Filed under: $work, 42, Technology — cricalix @ 20:55

As a current resident of the UK, I miss one key thing about phone calls in the US and Barbados - they’re free when local. All calls in the UK, be they local or international, cost money. Enter VoIP in the form of a Sipura SPA-2000 - a packetizer. Plug a phone in the RJ11 jack and an Ethernet cable in the RJ45 jack, add an Internet connection, sprinkle lightly with a provider like Gossiptel, stir gently and presto, free phone calls to anyone else on the provider’s network, and cheap calls to international phone numbers.
(more…)

March 21, 2005

UberCon VI and Planning

Filed under: 42, UberCon — cricalix @ 9:28

One of the things we’ve not managed to do yet is document our process for UberCon. So, last week I kicked off the documentation project for the LAN department of the con. My end-goal is a handbook, complete with network diagrams, that hopefully a chimpanzee can use to set up the network, provide services to NJ Lan Party (the crew who provide us with excellent fragging) and our attendees, and then tear the network down again. It turns out our hardware supplier is willing to do the physical setup, including video card upgrades for a (really) small fee, so while the handbook will cover how to do it, we won’t have to. Yay!

Feedback in our forum indicate that better maps of the con would be appreciated, so I’ve worked out a design that’ll let us display maps that are about 3 foot by 3 foot and a schedule of events down the side. A few of these dotted around the hotel should help people know where they are and where they want to get to. They’ll also be durable, which makes them reuseable for multiple cons. Even better, they won’t cost us an arm and a leg to build.

March 10, 2005

HHGTTG Movie

Filed under: 42 — cricalix @ 14:14

I watch maybe 2 movies a year at the cinema - the rest I watch on the 4 available TV channels, or perhaps rent the DVD. I’ve found the first movie to watch this year - Hitch Hiker’s Guide To The Galaxy - featuring Alan Rickman as the voice of Marvin (perfect if you ask me!). I’m not sure on the round-head Marvin appearance, but that’s the problem with books - they leave way too much to the imagination.

The trailer is also quite brilliant as trailers go - it talks about itself as an entry in the Guide. Very amusing.

March 9, 2005

UberCon is nigh!

Filed under: 42 — cricalix @ 15:05

UberCon V is just 2 days away now, and I won’t be there. Granted, I didn’t make it to UberCon II either, but that doesn’t make me any happier. I suppose I can take solace in the fact that I won’t be spending 16+ hours in an airplane and working like an absolute maniac for 4 days. In the meantime, as CTO and chief electronic madness guru, I get to worry about whether everything is working, how we’re going to improve the online scheduler for the next con in October and how we can better integrate with Dave’s app server CONGO.
(more…)

Next Page »

Powered by WordPress. Theme by H P Nadig