Note that there are some explanatory texts on larger screens.

plurals
  1. POdjango urlconf or .htaccess trouble
    text
    copied!<p>I am running my django project from subfolder of a website. Lets say the address where my project is meant to open from is.</p> <pre><code>http://example.com/myproject/ </code></pre> <p>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:</p> <pre><code>RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ mysite.fcgi/$1 [QSA,L] </code></pre> <p>The trouble is, that at some cases, instead of redireting user to page like </p> <pre><code>http://example.com/myproject/social/someurl/ </code></pre> <p>it redirects to</p> <pre><code>http://example.com/social/someurl/ </code></pre> <p>which does not work. What i want to know is how to fix this problem. </p> <p>Redirects in django-socialauth (github.com/uswaretech/Django-Socialauth), socialauth.views.py line 177 redirects without /myproject/, similar to the generic example above. I also use django cms2.0 in the project and it redirects user at admin auth to example.com/en/myproject/admin/, not example.com/myproject/en/admin. But that could be django cms's problem.</p> <p>Is this kind of behaviour 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: <a href="https://stackoverflow.com/questions/2321154/how-to-write-htaccess-if-django-project-is-in-subfolder-and-subdomain">How to write .htaccess if django project is in subfolder and subdomain?</a></p> <p>Alan.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload