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.

mirror server hosted at Truenetwork, Russian Federation.