.htaccess.wsgi 654 B

1234567891011121314151617181920212223
  1. # The Python interpreter option for the webserver. Use virtualenv.
  2. PassengerPython "./venv/bin/python3"
  3. Options +FollowSymLinks
  4. Options -MultiViews
  5. RewriteEngine On
  6. RewriteBase /
  7. # Redirect everything to HTTPS
  8. RewriteCond %{HTTPS} off
  9. RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
  10. # Remove www
  11. RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
  12. RewriteRule ^(.*)$ http://%1%{REQUEST_URI} [R=301,QSA,NC,L]
  13. # Remove trailing slashes
  14. # Do we need this rule? It's probably better not to use it, as it
  15. # could interfere with any regex match in some topic.
  16. # RewriteCond %{REQUEST_FILENAME} !-d
  17. # RewriteRule ^(.*)/+$ /$1 [NC,L,R=301,QSA]