... actually ... it has to be the mod_rewrite that is causing the problem with mod_wsgi. But I don't get why.
On Jul 2, 11:00 am, ALJ <astley.lejas...@gmail.com> wrote: > I successfully set up a django site to redirect all non secure content > to https. However, I want to bring it back a little and only use https > for account details and admin ("/accounts" and "/admin"). > > I've set up a rewrite in apache for those areas and the redirect seems > to be working, but it writes the full path of the django.wsgi into the > url! > > "https://www.mydomain.net/C:/www/mysite/pdbsite/apache/django.wsgi/ > accounts/login/?next=/promotions/" > > (... that knocking sound is me banging my head on the wall ...) > > Part of the the httpd.conf is: > > -------------------------------------------------------------------------- > <VirtualHost 123.123.123.123:80> > > ... > > DocumentRoot "C:/www/mydomain/pdbsite/main/site_media" > > #Make sure that all connections to the admin and accounts dirs are > secure > <Location /accounts> > RewriteEngine On > RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [QSA,NC,R,L] > </Location> > > #Aliases --------------------- > ... > Alias /media "C:/Python26/Lib/site-packages/django/contrib/admin/ > media" > WSGIScriptAlias / "C:/www/mysite/pdbsite/apache/django.wsgi" > > ... > </VirtualHost> > > -------------------------------------------------------- > The url.py is: > > urlpatterns = patterns('', > url(r'^admin/', include(admin.site.urls)), > url(r'^$','django.views.generic.simple.redirect_to', > {'url':'promotions'}), > url(r'^accounts/login/$', 'django.contrib.auth.views.login', > {'template_name': 'login.html'}, name="login"), > url(r'^accounts/logout/$', 'pdbsite.main.views.logout_view', {}, > name='logout'), > url(r'^accounts/change_password/ > $','django.contrib.auth.views.password_change' > {"template_name":"password_change.html","post_change_redirect":'password_change_done'}, > name='password_change'), > url(r'^accounts/change_password/password_change_done/ > $','django.contrib.auth.views.password_change_done', > {"template_name":"password_change_done.html"}, > name='password_change_done'), > ... -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@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.