Linux FAQ's & Manuals

c.1. apache mod_rewrite magic

apache's mod_rewrite module lets you do some truly amazing things with url rewriting. here are a couple of examples of what you can do.

  1. make it so if someone types http://www.foo.com/12345 , bugzilla spits back http://www.foo.com/show_bug.cgi?id=12345. try setting up your virtualhost section for bugzilla with a rule like this:

    
<virtualhost 12.34.56.78> rewriteengine on rewriterule ^/([0-9]+)$ http://foo.bar.com/show_bug.cgi?id=$1 [l,r] </virtualhost> 
  2. there are many, many more things you can do with mod_rewrite. please refer to the mod_rewrite documentation at http://www.apache.org.