yarson yarson - 6 months ago 36
PHP Question

Zend Framework application without virtual hosts

Is it possible to configure web server on Windows (Apache or IIS) without setting up virtual hosts so Zend Framework application could be accessed with link like http://example.com/myapp rather than http://example.com/myapp/public?


use this .htaccess

RewriteEngine On
RewriteRule ^(.*)$ public/$1?%{QUERY_STRING} [QSA,L]

and put this in application.ini

resources.frontController.baseUrl = "/myapp/"