Using .htaccess to force https on all requests in Zend MVC
- by davykiash
I have been battling with .htaccess to get all the requests to use https on my Zend MVC.
What am seeing is that SSL turns "on" and then goes "off" as the page loads.
Below is my .htaccess file.
SetEnv APPLICATION_ENV production
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ index.php [NC,L]
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
What do I need to adjust to get my https working properly?