I need to have a .htaccess rewrite rule redirect to a script in the root of a subdirectory, but only for any files/directories in that sub directory...
/
/subdir/
/index.php
/somedir/
/anotherdir/
For the structure above, I want anyone browsing to /subdir to go to /subdir/index.php, and anyone going to /subdir/somedir/ to /subdir/index.php etc...
If however, they go to the root directory. they should stay there... I've tried putting an .htaccess file in /subdir with a bunch of attempts at rewrite rules but so far none work.
update: I don't mean just the /somedir/ needs to redirect ot index.php, but any subdirectory of /subdir/ needs to be redirect... Scripts too, but obviously not /subdir/index.php
Sorry I wasn't clear before.