[mod_python] Aliasing extensions in mod_python

Sean Davis sdavis2 at mail.nih.gov
Sun Aug 26 19:39:16 EDT 2007

Roger Holness wrote:
> Hi
> I am working on a python script to generate dynamic wml
> I am using publisher of mod_python
> The problem I am having is that my script returns valid wml but my
> phone that I am testing on (and I assume others as well) doesn't check
> the mime type, rather just the extension
> ie. www.mywebsite/wml.py/test  is returning valid wml, but the phone
> doesn't realise that as it is expecting /test.wml
> Now functions names can't contain periods, so I can't do:
> def test.wml(req)
> I am therefore trying to alias wml.py/test.wml to wml.py/test,
> effectively tricking the phone into doing what it should be doing in
> the first place
> Any ideas how I would go about this?

Will mod_rewrite do what you want?  I think it will....


More information about the Mod_python mailing list