btw, that code is a bit weird. If you negate all the RewriteConds at the start, you only need one rule instead of two. You also then don’t need the [OR]s anymore.
SetEnv APPLICATION_ENV development
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-s
RewriteCond %{REQUEST_FILENAME} !-l
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^.*$ public/index.php [NC,L]
Also, since you don’t need to match the whole URL because you want to send everything to public/index.php, you can (and should) replace .* with .?
SetEnv APPLICATION_ENV development
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-s
RewriteCond %{REQUEST_FILENAME} !-l
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .? public/index.php [NC,L]
If you want to run the code in “myblog”, why not rename “public” to “myblog” ?
Also, if you want to run the code in “myblog”, why would you ask how you can run it in the root of your domain ?
some host allow for it and it’s a much better structure than the one you’re proposing IMHO.
Mostly because this completely prevents access to any directory other than “public” without having to explicitly forbid it like you would using your structure.
Can you put the index.php in the root of the web space instead of in the public/? You’d probably need to rewrite the index.php to change a few paths, but that should not be too hard.
It could probably be get to work with this public/ dir, but putting index.php in the root directory would be a lot easier.