I've gotten tired of creating soft redirects for my include files, so I've decided to use mod_rewrite if no one has a better idea. My situation:
I have a password protected admin directory. Let's call it "/foo/".
All my includes are at the HTTP root. Let's call it "/".
I have in include called inc_func_db.php in / but I need to access it from /foo/.
I don't want to make /foo/inc_func_db.php and code that to link to /inc_func_db.php because I have multiple includes.
If all includes are in the format inc_<some-name>.php would RewriteRule ^inc_([^/]+).php$ /inc_$1.php [R]
work? Or is there a better way?
Edit:Spelling fix