Basically I want to redirect EVERYTHING on my site to the main index file, except if the request is to a valid file in a certain folder, say example.com/files/
So it translates as:
- Code: Select all
if( $is_file && $folder == "^/files/" ) THEN do not redirect.
if( !( !$is_file && $folder != "^/files/" ) ) THEN redirect.
What I want to do, which is completely different to what I'm allowed to do, is:
- Code: Select all
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f [NAND]
RewriteCond %{REQUEST_URI} !^/files/.* [NC]
RewriteRule . /index.php [L]
Any help would be gratefully appreciated!
Thanks, mniz.