> I have my Django website and my static files deployed under the same >> directory (i.e. no separate 'static' directory), according to the following >> Apache RewriteRule: >> >> RewriteEngine on >> RewriteCond %{DOCUMENT_ROOT}%{REQUEST_**FILENAME} !-d >> RewriteCond %{DOCUMENT_ROOT}%{REQUEST_**FILENAME} !-f >> RewriteRule ^.*$ /django/$1 [QSA,PT,L] >> >> WSGIScriptAlias /django/ /var/www/domain.com/django/** >> site/wsgi.py <http://domain.com/django/site/wsgi.py> >> >> My site-wide urlconf looks like this: >> >> urlpatterns = patterns('', >> url(r'^blog/', include('blog.urls')), >> url(r'', include('home.urls')), >> ) >> >> With my app-specific urlconf ('home.urls') is simply this: >> >> urlpatterns = patterns('home.views', >> url(r'^(?P<uri>[a-z0-9-]+)/?$'**, 'page_by_uri'), >> url(r'^$', 'index'), >> ) >> >> So when I visit my site domain.com I should see the index view (which it >> does), and when I visit domain.com/foo I should see the >> page_by_uri('foo') view, *which it doesn't*. Instead, it shows the index >> view. (And I thought it should give an error!) >> >> Having surfed around a little bit, I reckon it's got something to do with >> Django's handling of SCRIPT_NAME (which should be equal to the mount point, >> in my case '/dj'). Various solutions are proposed, generally involving >> adding the mount point to my urlconf (bad!) until I tried it and it doesn't >> even work... >> >> Basically, how in the name of all that is holy and sacred can I get this >> to work?! >> >> Thanks in advance >> >> is it a problem with the trailing slash? > > That's a typo, it should read "WSGIScriptAlias /django /var/www/domain.com/django/site/wsgi.py", still, it doesn't work as it's supposed to. What am I doing wrong?
-- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/5nz0XcpUVBgJ. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.