Here is my directory structure:
root
root/cakephp
root/wordpress
How to redirect
example.com/cakephp
tocakephp
directory- and redirect the rest of urls to
wordpress
We have bespoke website that we want to configure it separately with cakephp and all the rerequest like example.com/cakephp
should go to cakephp directory and the rest of requestes goes to our CMS (which is wordpress in wordpress folder).
In the root .htaccess have this rule: