Rewrite Help

Dining at the Instituto Superior T├ęcnico

mod_rewrite is a pain to work with. In order to debug you need RewriteLog and if you’re on a shared host you’re probably stuck with evil .htaccess where Rewritelog is:

.htaccess: RewriteLog not allowed here

So what does one do?

While preparing alpha Debian packages for WP 1.6 I looked at the htaccess Wordpress generates. It’s just:

RewriteRule . /index.php

I didn’t know you could do this. This makes it so much easier to de-crufy URLs. I started an interesting thread on Wordpress hackers which details this sane URL rewriting technique.

Here is the code that implements Wordpress URL rewriting in PHP.

Advertisement

If you like this, you might like the stateless Web kiosk software I develop. Webconverger typically replaces Windows on PCs and is deployed in public and business environments for ease of deployment and privacy. Once installed it auto-updates making it painless to maintain. Try it where you exclusively use the only viable open platform... the Web!