I'm looking to put a web application in production and I was wondering a few things about htaccess.
Here is my htaccess (the default htaccess provided by Zend Framework) :
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]
I would have liked to add two things in there, first a condition based on the APPLICATION_ENV to force SSL connection, but only in production (other possible values are development, testing and staging). The other thing I would have liked to set up is a redirection to the corresponding error action in the error controller based on the HTTP request error number.
I am not looking for a full answer, but at least where I need to start to be able to achieve my goals.