2012-03-08 101 views
0

我试图得到的.htaccess mod_rewrite的重写规则,这样,如果有人类型domain.com/presentations是相同domain.com/cakephp目录的mod_rewrite的目录

我有下面这样远,但问题是cakephp没有认识到它是一个根。在routes.php中,我有Router::connect('/', array('controller' => 'contents', 'action' => 'conf'));,因此当您在浏览器的URL中键入cakephp目录根时,它会触发内容控制器和操作conf。

<IfModule mod_rewrite.c> 
    RewriteEngine on 
    Redirect /presentations /cakephp 
</IfModule> 

有没有办法实现这一点,以便我们可以从根.htaccess得到这个结果?

回答

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