Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

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

I want to access*) instead of*)

Directory structure:


RewriteEngine on
SetEnv APPLICATION_ENV    production

RewriteRule ^$ /public/ [L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !^/public/
RewriteCond %{REQUEST_URI} !^/api/
RewriteRule ^(.*)$ /public/$1 [L]


RewriteEngine on
SetEnv APPLICATION_ENV    production

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php [L]

I tried different combinations and I came to this simplest one. I tried Alias, put the api folder on root directory, etc.

To mention that the index.html from public folder is loaded first at, public folder is document root.

share|improve this question
Try to raise your mod_rewrite Loglevel. This is achieved differently for Apache 2.2 and 2.4: – weeheavy Feb 13 '13 at 9:55

Your Answer


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

Browse other questions tagged or ask your own question.