I completed my project on ZF2, then uploaded it on shared hosting. I would like a folder for the zend app with all the files inside, and then in the document root I would like the files from the public
folder to be visible, because I want my URIs to look like www.example.com
(not www.example.com/public/
).
相关问题
- Views base64 encoded blob in HTML with PHP
- Laravel Option Select - Default Issue
- PHP Recursively File Folder Scan Sorted by Modific
- Can php detect if javascript is on or not?
- Using similar_text and strpos together
You can move the files inside /public to your webroot. However, please be aware that config files below your webroot are a security risk.
This one work.
What I have done in those cases with ZF1 app is to throw an app directory in the document root and with your server's .htaccess equivalent made it not serve files from there (
Deny from all
). Then stick your gateway script into the document root and update the paths found in there includingAPPLICATION_ROOT
and the path to the autoloader.Hope this helps.