This is what im tying to re write for nginx...
If i browse to www.domain.com/anything/anything/anything/ the address in the browser shows www.domain.com/anything/anything/anything/ but the file that is loaded is index.php
If i browse to www.domain.com/blah/blah/blah/blah/ the address in the browser shows www.domain.com//blah/blah/blah/blah/ but the file that is loaded is index.php
but
If i browse to www.domain.com/html/test.html the address in the browser shows www.domain.com/html/test.html and the file that is loaded is test.html
If i browse to www.domain.com/css/default.css the address in the browser shows www.domain.com/css/default.css and the file that is loaded is default.css
If i browse to www.domain.com/images/logo.png the address in the browser shows www.domain.com/images/logo.png and the file that is loaded is logo.png
If i browse to www.domain.com/php/footer.php the address in the browser shows www.domain.com/php/footer.php and the file that is loaded is footer.php
So here is the .htaccess contents form the apache server
RewriteEngine on
RewriteRule ^html [L,NC]
RewriteRule ^css [L,NC]
RewriteRule ^images [L,NC]
RewriteRule ^php [L,NC]
RewriteRule ^.*$ index.php [L,QSA]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} !directory/(.*)$
RewriteCond %{REQUEST_URI} !(.*)$
RewriteRule ^(.*)$ http://www.domain.com/$1 [R=301,L]
I've tried many times to understand how to re-write this for nginx, but I just cant get a grip on how to achieve this, any help is most appreciated