yarson yarson - 1 year ago 92
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?

Answer Source

use this .htaccess

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

and put this in application.ini

resources.frontController.baseUrl = "/myapp/"
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download