On Feb 2, 9:14 pm, Johan <djjord...@gmail.com> wrote:
> Hi
>
>   I have deployed my application on Apache using WSGI, using
> WSGIScriptAlias / /var/www/site/django.wsgi. Everything looks very
> good. My actual application lives at http://<host>/application. So
> with the setup above when I browse to http://<host/ i get the normal
> django 404 page. I get this even if I add a .htaccess file ro
> redirect / to /application. I can understand why this happening, it
> because the wsgi script is rooted at / so the .htaccess file is never
> utilized. If I change the WSGIScript alias setting to be
> WSGIScriptAlias /application /var/www/site/django.wsgi. Then
> the .htaccess file gets invoked but django stops working.

If you want your django app to be the root of your django project, you
just have to fix your root urls.py. FWW, here's the relevant part of
my current project's root url.py:

urlpatterns = patterns(
    '',
    url(r'^$', main_views.home, name="home"),
    url(r'^blookshop/', include('blookshop.urls')),
    url(r'^admin/', include(admin.site.urls)),
   )


>  In the meantime what would also work is to add an entry in the main
> application's urls.py to redirect / to /application. But I don't know
> how to do this. So any help would be appreciated.

googling +django +redirect +view, I get the answer at the very top of
the list.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
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.

Reply via email to