More on Apache's mod_rewrite

Ángel Ortega

Links:

mod_rewrite Cookbook
Practical mod_perl: mod_rewrite Examples.

What I use here to emulate static pages:

RewriteEngine On
RewriteRule /(img|download)/.* - [L]
RewriteRule ^/(.+)/index\.html$ /?t=TOPIC&topic=$1       [PT]
RewriteRule ^/(.+)/(.+)\.html$  /?t=STORY&topic=$1&id=$2 [PT]
RewriteRule ^/(.+)/$            /?t=TOPIC&topic=$1       [PT]
RewriteRule ^/rss\.xml$         /?t=RSS                  [PT]
RewriteRule ^/sitemap\.xml$     /?t=SITEMAP              [PT]