开发者

Mod_rewrite for Zend Framework case

开发者 https://www.devze.com 2023-01-06 23:55 出处:网络
I\'ve got a pretty default ZF project, but I need to add TinyMCE to the mix. I have done that, but I also need a file manager for it, so I chose KCFinder. The problem here is, that it works through a

I've got a pretty default ZF project, but I need to add TinyMCE to the mix. I have done that, but I also need a file manager for it, so I chose KCFinder. The problem here is, that it works through a couple of .php files.

I have created a virtual host, which leads to my public folder, leaving the logic unavailable from outside. The way i see it, is I need to create a rule for the default .htaccess file to allow the server to access a specific folder that has the .php files needed for the manager. This folder will have to reside in the public folder.

Co开发者_运维知识库uld someone help me out with the RewriteRule statements?

SetEnv APPLICATION_ENV development

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ index.php [NC,L]

this is the .htaccess file I have now. Its pretty standard. My directory structure is:

host/
host/application/
host/public/
host/public/kc/

Public containts my index.php file for the Zend Framework, public/kc containts all of my .php files for the file manager. Thanks!


Turns out, that my only problem was that I had not specified the correct file paths. As soon as I did that, it all went smoothly.

0

精彩评论

暂无评论...
验证码 换一张
取 消