– SEF urls, the right way (I think) – SEF urls, the right way (I think)

SEF urls, the right way (I think)

I’ve seen a few sketchy little SEF implementations floating around, that still leave a lot of crap in the URL. I’ve been thinking about how to get past that for a while now, and finally came up with this.

I developed this against 4.5.1beta4, but it actually works with 4.5 1.0.7 (and i’d assume .8 and .9) as well (haven’t tested extensively).

This method uses a database, and effectively just caches the various urls and references them with a string. There are a few modifications to sef.php, a new table, a slight change to index.php, and a change to the mod_rewrite rules (.htaccess). I was trying not to touch the core stuff as much as possible, but it was a bit unavoidable.

You can see an example of this working on my temporary site: 4.5 install is at

Working on using Mambo (catually xMambo for it’s table-ripped-out-of-the-core-code-so-I-don’t-have-to-do-it aspect, and this is the sef code that seems to be the best free implementation for Mambo that I could find so far. By the way, WordPress has way better URL structure, one of the reasons I was initially attracted to it. Also posting it to bookmark it since I had to google for the author’s id from the CVS $Id:$ tag in the sef.php file to find the instructions again… heh. 🙂


Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

sell diamonds