Zend Framework 2 without Vhost configuration
问题 I had finished my first web application using Zend Framework 2 and I'm about to put it online. But may web host doesn't allow me to change my vhost configuration! The .htaccess file is allowed. So my question is: How to set up my ZF2 app with only .htaccess files? 回答1: Assuming you have a standard ZF2 application based of the skeleton, then try creating a .htaccess file in the root with this in it: RewriteEngine On RewriteRule ^\.htaccess$ - [F] RewriteCond %{REQUEST_URI} ="" RewriteRule ^.*$