Forum Moderators: phranque
I'm looking for a way to change the working directory (path) for a requested file based on its filetype. Something like: If file requested is filename.abc look for it in directory1/filename.abc, if file requested is filename.xyz look for it in directory2/filename.xyz, etc.
The filename could be anything. There would be dashes in it, I don't know if thats a problem. There should be a way to make conditions for four or five filetypes.
This doesn't seem to hard for someone who knows regexs but I'm at a loss even after a couple tuts. Whats a good way to learn?
Thanks!
--Peter