← Back to List

Mod_Rewrite Magic

added on Monday, Mar 20, 2006 8:44 am

Hello dear reader. May I turn your attention to the top of this and your browser window: After clicking any link, please have a look at the address field, the experts like to refer to it by the URL. Since some minutes ago you can see a nice and talkative folder structure like "favourites/newest" there instead of ugly things like "index.php?tagId=12&itemId=34".

This is done by the magical Mod_Rewrite apache webserver module. I implemented it over the weekend. It turns the string after "tint.de" into environment variables passed to the php script:

before: http://www.tint.de/favourites/newest

after: http://www.tint.de/index.php?t=favourites&i=newest

This is done superfast and without the user noticing that the URL is not really pointing to subfolders. Technology can be so much fun.

If anything is broken now, please let me know, by email to Tilman-at-tint-dot-de, or by posting a comment below.

blog comments powered by Disqus