Hello,
I have faced some problem with url transformations.
I've configured my Django project at kuloto.heliohost.org/cartoons/
but Django gives an error as if it gets 'dispatch.wsgi' in its requests:
Request Method: GET
Request URL: http://kuloto.heliohost.org/cartoons/dispatch.wsgi/
Using the URLconf defined in urls, Django tried these URL patterns, in this order:
^cartoons/$
^cartoons/gravity/$
^cartoons/gravity/history/$
^cartoons/gravity/([0-9.]{1,5})/$
The current URL, cartoons/dispatch.wsgi/, didn't match any of these.
I tried to change patterns directly in my Django project to
^cartoons/dispatch.wsgi/gravity/$
^cartoons/dispatch.wsgi/gravity/history/$ and so on and it begun to work but it is not good solution because all requests without trailing slash like cartoons/gravity transforms to cartoons/dispatch.wsgi/gravity/
It probably happens because Django automatically completes requests with slash. And as a result many links dont work.
So my question how to configure .htaccess or whatever to avoid this behavior?
.htaccess content is standard:
RewriteEngine On
RewriteBase /
RewriteRule ^(media/.*)$ - [L]
RewriteRule ^(files/.*)$ - [L]
RewriteRule ^(admin_media/.*)$ - [L]
RewriteRule ^(dispatch\.wsgi/.*)$ - [L]
RewriteRule ^(.*)$ cartoons/dispatch.wsgi/$1 [QSA,PT,L]