django urlconf or .htaccess trouble

Posted by Zayatzz on Stack Overflow See other posts from Stack Overflow or by Zayatzz
Published on 2010-03-29T09:48:38Z Indexed on 2010/03/29 9:53 UTC
Read the original article Hit count: 446

Filed under:
|
|

Hello

I am running my django project from subfolder of a website. Lets say the address where my project is meant to open from is.

http://example.com/myproject/

the myproject folder is root folder for my user account. In that folder i have fcgi script that starts my project. The .htaccess file in the folder contains this:

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ mysite.fcgi/$1 [QSA,L]

The trouble is, that at some cases, instead of redireting user to page like

http://example.com/myproject/social/someurl/

it redirects to

http://example.com/social/someurl/

which does not work. What i want to know is how to fix this problem. Is this django problem and i should change it with urconf and add myproject to all urls, or should i do this with .htaccess? I found similar question, which, sadly, remains unanswered: http://stackoverflow.com/questions/2321154/how-to-write-htaccess-if-django-project-is-in-subfolder-and-subdomain

Alan.

© Stack Overflow or respective owner

Related posts about django-urls

Related posts about .htaccess