将 2 个不同的域重定向到 2 个不同的目录 + .htaccess

Redirect 2 different domains to 2 different directory + .htaccess

这是我的目录结构:

root
root/cakephp
root/wordpress

如何重定向

我们有定制网站,我们想用 cakephp 单独配置它,所有像 example.com/cakephp 这样的重新请求应该转到 cakephp 目录,其余请求转到我们的 CMS(wordpress 文件夹中的 wordpress) .

在 root .htaccess 中有这个规则:

RewriteEngine On

RewriteRule !^(cackephp|wordpress)/ wordpress%{REQUEST_URI} [L,NC]