On Feb 18, 2008, at 10:06 PM, [EMAIL PROTECTED] wrote: > > Hi, I want to deploy a Django project on Apache but in a URL like: > http://localhost/django > > I can do it but since I have some HttpResponseRedirect on my project > pointing to '/', it will end up on: > http://localhost/ > > Is there any way to make django to use the http://localhost/django URL > as its root URL without having to touch the projects code?
In your settings file, you can have ROOT_URLCONF point to a dummy url file, say 'dummyurls.py'. That file has a single line in the urlpatterns, like so: urlpatterns = patterns('', (r'django/', include('path.to.real.urls')), ) Unless I've typed something wrong, that will peel off the leading 'django' from your path info, and the rest of your project will be none the wiser. Yours, Eric --~--~---------~--~----~------------~-------~--~----~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---