views:

45

answers:

0

I tried to configure my django project on a shared hosting (which supports mod_python).

Following the procedures, i did make it with their proposed folder structure in the end:

[folder structure]

  /..
    /MYAPP 
    /public_html
     .htaccess

in .htaccess

PythonPath "['/home/MYACCOUNT/' ] + sys.path"
SetHandler python-program
PythonHandler django.core.handlers.modpython
SetEnv DJANGO_SETTINGS_MODULE MYAPP.settings
PythonDebug On

so I do not have any trouble linking to my website using the URL, such as http://MYACCOUNT.com

However, i have multiple django projects to be deployed. I think it would be more reasonable to use the subdirectory to arrange my multiple projects. So if i have two porjects, like MYAPP1 and MYAPP2.

  /..
    /MYAPP1
    /MYAPP2 
    /public_html
     .htaccess

So i am wondering how i can setup my .htaccess to link to these projects via http://MYACCOUNT.com/MYAPP1 and http://MYACCOUNT.com/MYAPP2 respectively.

I look for the information online, but most of the suggestions concern that i should set up the virtual host on the computer. However, I'm using a shared web hosting. The only thing i am really allowed to alter is probably the .htaccess files. Does anyone come up with a better idea?

Thank you so much!