mod rewrite not showing content on 2nd level links
===

Hello I have a mod_rewrite script for seo friendly urls on a personal site that I built. This script was wroking great until I noticed I could not accsess my admin folder which is a real directory on the server. The .htacsess look like this before I made my first change.


----------------------------------------------------------------------------------

    Options +SymLinksIfOwnerMatch
    RewriteEngine on

    RewriteCond %{HTTP_HOST} !^www\.
    RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]

    RewriteRule \.(css|jpe?g|gif|png|js)$ - [L]

    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f


    RewriteRule ^(.*)$ index.php?page=$1
    RewriteRule ^(.*)/(.*)$ index.php?page=$1 

-----------------------------------------------------------------------------------


so I modified the script and added a second set of these two rules:

RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f

directly before the last rule so it looked like this without the first 4 lines of code:

    RewriteRule \.(css|jpe?g|gif|png|js)$ - [L]

    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f

    RewriteRule ^(.*)$ index.php?page=$1

    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f

    RewriteRule ^(.*)/(.*)$ index.php?page=$1 

--------------------------------------------------------------------------------

Once I did this I was able to accsess the admin directory but now the content will not display on the 2nd level links so it looks like the last rule is being ignored. 

Can anybody help me see what I am doing wrong I would be very greatful.


Ryan Bauer



