Hello All
I have been trying this for a few hours now and I know it is something SIMPLE I am missing but I just cannot get it.
I have this
if the file and folder DO NOT exist on the server redirect
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /otherfile.php [L,NC,QSA]
Which I need and need it to take place before any other code. (note the QSA)
I need something to take place
AFTER the above
ONLY if the file or folder requested
DO NOT exist on the server.
If they DO exist on the server I need to redirect all request for them if they do not come from a certain IP
RewriteCond %{REMOTE_ADDR} !^00\.00\.00\.00$
SOMETHING HERE - IF FILE OR FOLDER EXIST
RewriteRule !^index.htm index.htm [R,NC,L]
I have tried many things including
RewriteCond %{REQUEST_FILENAME} -f
and
RewriteCond %{REQUEST_FILENAME} -d
with
RewriteRule !^index.htm index.htm [R,NC,L]
but then the top rule breaks and it redirects all to index.htm
Please help
Thanks