ok i have my .htaccess at /something/.htaccess my directory tree is like: /something/subfolder/process/read.php /something/subfolder/files/example.jpg here's want i want if url is /something/mask/read ----> /something/subfolder/process/read.php if url is /something/mask -----------> /something/subfolder the 2rd rule basically means that if "/mask" is not followed by "/read" then "/mask" will be only a mask of folder "/subfolder" so if url is /something/mask/read?q=1, that's actually /something/subfolder/process/read.php?q=1 and if url is /something/mask/files/example.jpg, that's actually /something/subfolder/files/example.jpg note that the second rule is not exclusive for files. if url is /something/mask/anyfolder/action.php, then that's actually /something/subfolder/anyfolder/action.php
I'm not very good with htaccess but I found a good guide to explain it better than I could. http://www.webmastertips.us/tutorials/mod_rewrite.htm He found a way to do it