Hi guys,
I am using .htaccess and mod_rewrite in my little PHP framework. It's working nicely, but I want to expand on just having it redirect everything to index.php.
My directory structure is something like this (obviously simplified)
apps
media
system
-- admin
jscript
templates
My current rewrite rules is:
RewriteEngine On
RewriteCond $1 !^(index\.php|media|jscript)
RewriteRule ^(.*)$ index.php/$1 [L,QSA]
As you can see, everything 'mydomain.com/url' is redirected to index.php. What I would like to do now is allow anything 'mydomain/admin/' to direct to the 'admin' directory inside the 'system' folder. I want normal conditions inside this folder too, so rather than use clean users, I would use urls like 'mydomain.com/admin/some-kind-of-file.php'.
In a nutshell, I just want my rewrite condition to apply to everything except my system/admin folder.
Is this possible? Any help would be greatly appreciated!