Changes between Initial Version and Version 1 of django_apache_and_mod_rewrite


Ignore:
Timestamp:
Sep 11, 2006, 4:17:52 PM (18 years ago)
Author:
anonymous
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • django_apache_and_mod_rewrite

    v1 v1  
     1== Using mod_rewrite with Django on apache ==
     2
     3
     4here are a few gotchas with using django+mod_rewrite (sure, your urls are clean, but sometimes it's easier not to have the root url to mod_python setting !
     5
     61) when mod_rewriting to a 'in django' part of your url space, be sure to use [PT], or at the end, the url will be understood as a filepath and not given back to mod_python handler.
     7The [PT] option of a mod_rewrite rule ensures that.
     8
     92) Beware the trailing slashes ! Django, by default (there is an option) adds a trailing / to urls without it, by REDIRECTING to the url+/. So if you mod_rewrite an url to your django one, don't forget the trailing / or disable adding them, because else mod_rewrite will rewrite url to new_url and then django will redirect to newurl+/ and thus you'll loose your neat urls in the address bar.
Back to Top