« A favourite image | Main | Outlook snappiness »

Apache tip

Just learned about this handy tip for Apache:

 


RewriteEngine on
RewriteRule ^/book/([^/]*)/([^/]*) /cgi-bin/book.cgi?author=$1&subject=$2 [PT]

 

It rewrites a URL so it can be arguments to a cgi program so something like

http://server/path/blah

can be parsed as

http://server/someDirectory/someCGI.cgi?path=blah

 

Handy!

 

Post a comment

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)

About

This page contains a single entry from the blog posted on February 5, 2009 9:47 AM.

The previous post in this blog was A favourite image.

The next post in this blog is Outlook snappiness.

Many more can be found on the main index page or by looking through the archives.