I feel like an idiot for asking help here, but I am stumped as to a
configuration issue to get ZF working in a subdirectory off a virtual
host.  Here's the story:

I have my virtual host
chris.example.com

I want to run ZF under the following URL

chris.example.com/api/

In the virtual hosts configuration for Apache (I'm running Apache 2)
I've done the following:

<VirtualHost *:80>
       DocumentRoot /home/chris/chris.example.com/
       ServerName chris.example.com
       ErrorLog logs/chris.example.com-error_log
       CustomLog logs/chris.example.com-access_log combined
       SetEnv ZF_CONF staging

       <Directory /home/chris/chris.example.com/>
               AllowOverride All
               Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
               Order allow,deny
               Allow from all
       </Directory>

       Alias /api/ /home/chris/chris.example.com/api/public/

       <Directory /home/chris/chris.example.com/api/public/>
               AllowOverride All
               Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
               Order allow,deny
               Allow from all
       </Directory>
</VirtualHost>

In my .htaccess file in public, I've done the following:

RewriteEngine on

# all files with .something are skipped
RewriteBase /api/
RewriteCond %{REQUEST_URI} \..+$
RewriteCond %{REQUEST_URI} !\.html$
RewriteRule .* - [L]

# the others are redirected to the dispatcher
RewriteRule ^(.*)$ index.php [QSA,L]


Now, if I go to chris/example.com/api I get my 'index' action in my
'index' controller, which is what I expect.  But when I try anything
else, I get a 404.  Obviously I'm missing something simple here, but
google has not helped me find it.

Any thoughts or suggestions would be greatly appreciated.

--
Chris Hartjes


My motto for 2007:  "Just build it, damnit!"

@TheBallpark - http://www.littlehart.net/attheballpark
@TheKeyboard - http://www.littlehart.net/atthekeyboard

Reply via email to