The Emergent Properties of Meat
Blog
Software
Hardware
About me
Photography
 Logos
Bigger projects: emc2 & AXIS
Friends' pages:
Alex
Bill
Chris
Jon
Michael
Email me: jepler@unpy.net

« African Violet flower macros | Newest entries in software | ET-ARM Stamp »

Aether likes to have its own directory component, which I called "index.cgi" on all the sites I've set up. Finally, I have changed my webserver configuration to get rid of this need, while keeping the old site layout working (I think).

In index.cgi I hard-coded file_dir, data_dir and file_base. The first two make Aether find files on the filesystem correctly, and the last one makes it send the correct URLs in pages it renders.

In /etc/httpd/conf.d/emergent, I write these directives:

  RewriteEngine on
  RewriteRule ^/index.cgi-files/ - [L]
  RewriteRule ^/files/(.*)$ /index.cgi-files/$1 [L]
  RewriteRule ^/index.cgi/ - [L]
  RewriteRule ^/index.cgi$ /index.cgi/ [L]
  RewriteRule ^(.*)$ /index.cgi/$1
Their effect is to, well, make everything work right. The first and third directives ensure that paths beginning with /index.cgi-files/ and /index.cgi/ are passed through unchanged, for compatability with old URLs. The second rule makes /files an alias for /index.cgi-files. The next to last rule makes the old "index.cgi" without trailing slash continue working. The last rule rewrites everything else so that it is handled by index.cgi.



Powered by the Emergent Properties of Meat. Copyright © 2004-2007 Jeff Epler
[æ]