RewriteEngine On
# If URL to the application is http://foo.com/path/to/ZendSkeletonApplication/
# the set the base to /path/to/ZendSkeletonApplication/
RewriteBase /
RewriteRule ^.htaccess$ - [F]
RewriteCond %{REQUEST_URI} =""
RewriteRule ^.*$ public/index.php [NC,L]
RewriteCond %{REQUEST_URI} !^/public/.*$
RewriteRule ^(.*)$ public/$1
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule ^.*$ - [NC,L]
RewriteRule ^public/.*$ public/index.php [NC,L]