24 September 2007
Back to standard mod-rewrite rules
I've reverted our virtual hosts configuration back to a standard mod-rewrite setup rather than redirecting all requests through our rewrite.pl script. I can't put my finger on the problem, but there seems to have been some strange instability issue involving corrupt content or incorrect files being returned from some requests. When I installed our wikia setup on my local machine the problems became far more noticeable and I was able to isolate the problem to rewrite.pl, so until that problem is sorted out we're back to the old-fashioned rewrite mechanism.
Organic Design uses a single virtual host container to handle all our hosted sites and wikis by rewriting the requested URL to an internal filesystem path which includes the domain name. This means we can add new domains or modify existing domains and the applications they map to dynamically without ever changing our virtual host configuration or restarting the web-server. the virtual-host configuration has been updated to match the features previously defined in rewrite.pl as follows: Organicdesign.vhost
- The first rule allows the main page of a wiki to be accessed via the naked URL.
- The second rule allows non-existent image thumbnail sizes to be created.
- The third ensures that internal files are still accessible.
- And the last is the friendly URL rule which maps the request to a wiki article if none of the other rules matched.