Daric
Daric

Reputation: 16769

Can I put the public folder files to the site root Zend Framework

I am on shared hosting server and I am going to place zend there but I can not touch httpd.conf file to make a virtual host as it is shared hosting and they do not allow me.

If I keep index.php file and .htaccess in the public folder I have to make a virtual host to hide the public from the url.

So, I though that I can put the public folder files (index.php, .htaccess) in the site root thus I don't need to create a virtual server for this and my site is accessible without the need of public in url.

Is there anything make my site unsafe if I put index.php file out of public folder.

Upvotes: 1

Views: 459

Answers (1)

paulrichards19
paulrichards19

Reputation: 46

Access to these files can cause some security risks. An option could be to place a .htaccess file within each of the application and libray folders to prevent access.

e.g

<Files *>
Deny from all
</Files> 

Upvotes: 2

Related Questions