Is this possible? I don’t want to setup a VHost since I use a grid server for live sites. I encounter this when trying to use Zend Framework, but it always makes me go to the /public directory. It basically makes all folder inaccessible except the public one, and the public folder is the one that appears at the site root.
What is the DocumentRoot of your website? Your discussion makes it seem as though public is the DocumentRoot (which would mean that all the other directories are not in your webspace).
If that’s not the case, you’ll need to show the .htaccess in the DocumentRoot as it’s apparently redirecting all to public/. We’ll look for RewriteBase in there (amongst other oddities).
The document root would be: /html/
The /public/ directory is the actual directory the re-writing is happening in.
It is kind of like saying: Keep everything on the /html/ directory non-accessible to HTTP, yet allow the /public/ directory to be accessible and behave as the root.
Do you think this is a bad idea?
/html/.htaccess
RewriteEngine On
RewriteBase /public/
/html/public/.htaccess
Options +FollowSymLinks
AddDefaultCharset UTF-8
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-l
# This below probably needs a fix
RewriteCond %{REQUEST_URI} !^/public/
RewriteRule ^(.*)$ index.php?url=$1 [QSA,L]