Something on our host was driving me crazy for hours yesterday.
after deploying to mysite.com/directory, when I followed a link (say about-us) it would take me to mysite.com/about-us instead of mysite.com/directory/about-us.
I thought it might be related to the Site settings and even tried the shell:
>>> from django.contrib.sites.models import Site
but that returned mysite.com/directory.
Fortunately support at webfaction is pretty quick and smart and they pointed us to a variable in the settings file. If you’re having that same problem just add:
FORCE_SCRIPT_NAME = "/directory"
(with no forward slash)