2013-03-25 59 views
0

我安装Kohana 3.2的效果很好。该网站是可导航的,并且CRUD功能也可以使用。他在示例地址:www.site.com.br/folder/。重写删除网址 - kohana 3.2和.htacess

在.Htacess我


    # Turn on URL rewriting 
    RewriteEngine On 

    # Installation directory() 
    RewriteBase /folder/ 

    # Protect hidden files from being viewed 
    Files .*> 
    Order Deny,Allow 
    Deny From All 
    /Files> 

    # Protect application and system files from being viewed 
    RewriteRule ^(?:application|modules|system)\b.* index.php/$0 [L] 

    # Allow any files or directories that exist to be displayed directly 
    RewriteCond %{REQUEST_FILENAME} !-f 
    RewriteCond %{REQUEST_FILENAME} !-d 

    # Rewrite all other URLs to index.php/URL 
    RewriteRule .* index.php/$0 [PT] 

当我写完整的URL网址www.site.com.br/folder/它的工作。

但现在服务器指向根,我需要像www.site.com.br,在其他作品中,删除folder/

我尝试了一些选项,但Kohana的停止工作:

RewriteRule .* folder/index.php/$0 [PT]RewriteRule ^folder/(.*).* index.php/$0 [PT]

回答

0

你只需要从超文本访问脚本删除RewriteBase。然后,这个URI将在Kohana中正确解析。