Recently in programming Category

Apache tip

| No Comments

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!