Zend Framework on shared hosting

后端 未结 12 1450
孤独总比滥情好
孤独总比滥情好 2020-12-04 17:01

I\'m new to Zend Framework. I would like to know how to implement zend framework on a shared hosting. Because of the zend framework folder structure all view files are put i

12条回答
  •  时光取名叫无心
    2020-12-04 17:52

    Actually I've searched for it and found a lot of answers (most of them here on SO), but none of them worked for me. So I finally found a solution - .htaccess on root dir:

    RewriteEngine on
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule !\.(js|ico|txt|gif|jpg|png|css)$ index.php
    

    This one from http://framework.zend.com/wiki/display/ZFDEV/Configuring+Your+URL+Rewriter and index.php on root dir:

    
    

    This one from http://akrabat.com/zend-framework/zend-framework-on-a-shared-host/ And it works for me even if there are other project dir in root folder - like forum or so. Thought it might be useful to someone :)

提交回复
热议问题