[mod_python] Mod_Python and RewriteRule

Graham Dumpleton graham.dumpleton at gmail.com
Wed Apr 11 18:41:15 EDT 2007


On 12/04/07, Nathan C. Tresch <nathan at yapta.com> wrote:
> We're using Myghty and Mod_Python.  The following RewriteRule produces a
> 404:
>
> RewriteRule /trip-([0-9]*)/.*/
> /user/trip.myt\?tab=airlines&id=$1 [L]
>
> Previously, before we converted to PHP, the rule looked like this:
>
> RewriteRule /trip-([0-9]*)/.*/
> /user/trip.php\?tab=airlines&id=$1 [L]
>
> This worked.
>
> Can anyone tell me what gives?

Have you tried debugging what mod_rewrite is doing by increasing its
logging output using the RewriteLogLevel directive etc? From that you
can see what it finally rewrites it to. You can then try putting that
URL into the browser directly and try and work out why any other
configuration may not be correct.

Graham


More information about the Mod_python mailing list