Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

let's say that i have the following directory structure


and my site root is

i would like all request to to be redirected to , whilst keeping the request url to

my server is on Dreamhost and with them i simply point my site root to the public folder, but my current client's host doesn't offer this facility. what would be the best way to achieve this?

also , since i'm using ZendFramework , the public folder contains a .htaccess file with the following rules i wish to avoid conflicting with.

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ index.php [NC,L]

thanks for your help!

share|improve this question

Adding this to your root directory should have the intended effect, though there may be a more graceful way of doing it:

RewriteCond %{REQUEST_URI} !^/public [NC]
RewriteCond %{REQUEST_URI} !^/library [NC]
RewriteCond %{REQUEST_URI} !^/application [NC]
RewriteCond %{REQUEST_URI} !^/site [NC]
RewriteCond %{REQUEST_URI} !^/lib [NC]
RewriteRule ^(.*)$ /versions/1.0/public/$1
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.