How to write .htaccess if the django project is in a subfolder and subdomain?

The path to my site the django: staging.ninjawebsite.com/clients/project/.

I want this to be considered as a base url. The django project is located in a subfolder public_html/clients/project. Everything seems to be working fine, but all links, in order to say /city/, should go to the stage. ninjawebsite.com/clients/project/city/but he goes into staging.ninjawebsite.com/city/.

Here is my .htaccess file:

  AddHandler fcgid-script .fcgi 
  Options +FollowSymLinks 
  RewriteEngine On 
  RewriteBase /

  RewriteRule ^(media/.*)$ - [L]
  RewriteRule ^(admin_media/.*)$ - [L]
  RewriteCond %{REQUEST_URI}!(django.fcgi) 
  RewriteRule ^(.*)$ /clients/project/django.fcgi/$1 [QSA,L]

Someone please help me! Thank you

+3
source share

Source: https://habr.com/ru/post/1734124/


All Articles