diff --git a/deps-packaging/apache/httpd.conf b/deps-packaging/apache/httpd.conf index a28e91d34..3d630983e 100644 --- a/deps-packaging/apache/httpd.conf +++ b/deps-packaging/apache/httpd.conf @@ -251,6 +251,10 @@ AddType application/x-httpd-php-source php RewriteEngine On + # Force https with redirection + RewriteCond %{HTTPS} off + RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L] + # redirect from `index.php/path` to `/path` RewriteCond %{REQUEST_URI} !(.*)/api/(.*) [NC] #do not apply redirect to internal APIs for backward compatibility RewriteCond %{THE_REQUEST} /index\.php/(.+)\sHTTP [NC]