Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've been programming in PHP for a long time, and I've just recently decided to make the switch to Python. Of all the Python web frameworks, I settled on Twisted Web to build the framework of my startup.

However (and I know it sounds nitpicky), mod_rewrite was something that I really appreciated about Apache. I want the entire system written in Python, and not just bits and pieces written in PHP and Python: while a PHP frontend could work, I'd avoid it if it was at all possible.

Is it possible to build such an application without resorting to ugly urls?

Note: I am aware of the fact that Django allows URL rewriting, but it kinda defeats the purpose of using Twisted by itself.

share|improve this question
up vote 1 down vote accepted

There's a section of the Twisted Documentation that mentions inspiration from Apache's mod_rewrite and lists some methods, specifically twisted.web.rewrite, to do similar things.

share|improve this answer
Thank you very much! :) – pyri Aug 19 '11 at 9:07

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.