I have a server running with the following directory structure:
/public_html
| - /fingertools
| - /css
| - /static
| - /media
| - /js
| - .htaccess
My .htaccess is in the root of the "public_html" folder, and the main files of the website are in the "fingertools" folder, which is a Django project.
I want to rewrite through the .htaccess all requests to http://mydomain.com/ to the "fingertools" folder, except any file inside http://mydomain.com/static/ should be redirected to the "static" folder.
I'm not able to do this, I need it to put all the CSS and JavaScript into this folder for the website to work.
I have this so far:
Options +FollowSymlinks
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} !(fingertools)
RewriteRule ^(.*)$ fingertools/$1 [L]
Which redirects me to my Django project, giving me a 404 error for not having the /static/ URL mapped in the urls.py file. Any ideas? Thank you very much
Options +FollowSymlinks
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} !^/(fingertools|static)(/|$)
RewriteRule ^(.*)$ fingertools/$1 [L,QSA]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With