Zend Framework application without virtual hosts

后端 未结 4 1576
天命终不由人
天命终不由人 2020-12-30 16:37

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://exam

4条回答
  •  长发绾君心
    2020-12-30 17:06

    Create a .htaccess file and place it into root direectory with following content

    RewriteEngine on
    RewriteRule (.*) public/$1
    

    And add below line to your application/configs/applicaton.ini file

    resources.frontController.baseUrl = "/myapp/"
    

    There will be no error I will work fine.

提交回复
热议问题