[Twisted-web] Simplest way to mimic Apache/IIS virtual directories?
andy at reportlab.com
Mon Apr 25 18:58:58 MDT 2005
I am taking first steps with Twisted Web (after a brief
play 18 months ago) and want to port across a large
number of existing web apps which currently run
under Apache. These apps currently use our own very simple
CGI framework with App, Request and Response classes.
It took me under 1 hour from download to having
a running .rpy file which wraps my own framework and
actually runs through the main actions of the apps, passing
all parameters correctly. I am VERY impressed....
One last problem. My app suite has a lot of mappings like
this defined in the Apache config file:
Alias /fooimages/ "C:/code/customer/fooserver/images/"
Alias /barimages/ "C:/code/customer/barserver/images/"
In general these let each app refer to static web content
which is shipped in that app's code base. I have
hundreds of page templates, and would really like to
avoid changes so I can "parallel run" cgi and twisted
on different ports.
Is there some way I could define these in twisted.web?
(I can see the Alias in twisted.web.rewrite, but have
not found any examples of usage. I think I could see
how to create a fooimages.rpy resource which explicitly
trawls through the corresponding directory, but it would
have .rpy on it)
ReportLab Europe Ltd
More information about the Twisted-web