mod_rewrite, grabbing top level directory
I am having some problems getting mod rewrite to work the way I want it too.basically I am trying to get it to act like a virtual file system, but only when the directory or index.html doesn't exist or *.php isn't explicitly called:
so:
http://somesite.com/ -> index.html
and:
http://somesite.com/beansandbyte/ -> siteviewer.php
here is where I am currently standing, it is picking up index.html ok, but doesn't seem to redirect to siteviewer.php. I have tried a couple ways and I can get one or the other to work, just not both.
RewriteEngine on
RewriteLogLevel 3
RewriteLog "/private/var/log/httpd/rewrite.log"
RewriteCond %{REQUEST_FILENAME} !/images/*
RewriteCond %{REQUEST_FILENAME} !/css/*
RewriteCond %{REQUEST_FILENAME} !/js/*
RewriteCond %{REQUEST_FILENAME} !/*.php
RewriteCond %{REQUEST_FILENAME} !/members/*
RewriteCond %{REQUEST_FILENAME} !/admin/*
RewriteCond %{REQUEST_FILENAME} !/
RewriteRule ^/ /siteviewer.php [PT]
rewrite.log:
10.0.0.3 - - [12/May/2004:11:23:14 -0500] [www.somesite.com/sid#824d00][rid#842638/initial] (2) init rewrite engine with requested uri /beansandbyte/Profile/
10.0.0.3 - - [12/May/2004:11:23:14 -0500] [www.somesite.com/sid#824d00][rid#842638/initial] (3) applying pattern '^/' to uri '/beansandbyte/Profile/'
10.0.0.3 - - [12/May/2004:11:23:14 -0500] [www.somesite.com/sid#824d00][rid#842638/initial] (1) pass through /beansandbyte/Profile/
error_log:
[Wed May 12 11:23:14 2004] [error] [client 10.0.0.5] File does not exist: /www/somesite/pub/beansandbyte/Profile/
access_log:
10.0.0.5 - - [12/May/2004:11:23:14 -0500] "GET /beansandbyte/Profile/ HTTP/1.1" 404 299
Any help would be greatly appreciated.