Need to redirect a directory name to one location while directing file paths within that directory to other locations.
In other words:
Redirect /ORIGdirectoryname/ to /Adirectoryname/
Redirect /ORIGdirectoryname/file.php to /Bdirectoryname/
I am finding that if I write:
redirect 301 /ORIGdirectoryname/ http://yourdomain.com/Adirectoryname/
redirect 301 /ORIGdirectoryname/file.php http://yourdomain.com/Bdirectoryname/
It may be the order it is in.
If you can imagine the timeline of events, it will go:
/origdirectoryname/(file here) 301 to
Then it won't trigger the second redirect because it's no longer on
origdirectoryname. If you redirected the file first, it would go:
/origdirectoryname/file.php 301 to
Then it would not trigger the redirect from
adirectory, as you are now on