views:

81

answers:

1

I have a django website running with mod_python and Apache. The current configuration directs all / traffic to the django site. Now, I need to enable userDir /~user on the machine as well. I have enabled the userDir module in Apache. Since, Apache is redirecting all the request to the django app, /~user is not working as the django just blurts out a 404. I understand that this is happening due to the following reason

<Location "/">
  SetHandler python-program
  PythonHandler django.core.handlers.modpython
  SetEnv DJANGO_SETTINGS_MODULE web.settings
  PythonOption django.root
  PythonDebug off
  PythonPath "['/path/to/the/django/source/'] + sys.path"
</Location>

What would I have to do to serve the webpage from / and also serve userDir from /~user ? (I think it has to do with regex and LocationMatch Apache directive. I am not good enough with regex to do what I want). Any help will be greatly appreciated.

A: 
<LocationMatch "^/(?!~)">
  ....
</LocationMatch>
Ignacio Vazquez-Abrams
perfect. It worked like a charm. Thanks a lot.
Mir