.htaccess 目录的MOD_重写

.htaccess 目录的MOD_重写,.htaccess,cakephp,mod-rewrite,routes,.htaccess,Cakephp,Mod Rewrite,Routes,我正在尝试将MOD_rewrite on.htaccess设置为重写规则,这样,如果有人键入domain.com/presentations,就可以与domain.com/cakephp目录相同 到目前为止,我已经了解了以下内容,但问题是cakephp没有将其识别为根。在routes.php中,我得到了Router::connect'/',数组'controller'=>'contents','action'=>'conf';所以,当您在浏览器的URL中键入cakephp目录根时,它会触发con

我正在尝试将MOD_rewrite on.htaccess设置为重写规则,这样,如果有人键入domain.com/presentations,就可以与domain.com/cakephp目录相同

到目前为止,我已经了解了以下内容,但问题是cakephp没有将其识别为根。在routes.php中,我得到了Router::connect'/',数组'controller'=>'contents','action'=>'conf';所以,当您在浏览器的URL中键入cakephp目录根时,它会触发contents controller和action conf

<IfModule mod_rewrite.c>
   RewriteEngine on
    Redirect /presentations /cakephp
</IfModule>
有没有办法实现这一点,以便我们可以从root.htaccess获得这个结果

#Options +FollowSymLinks
RewriteEngine On
RewriteBase /
RewriteRule presentations /cakephp [L]