HHVM - 重写单入口点的规则

时间:2013-09-23 17:10:44

标签: hhvm

我目前正在测试HipHop虚拟机,值得一个网络应用程序。以前,我习惯使用这个htacess文件在LAMP environement中运行它:

Options +FollowSymLinks
IndexIgnore */*
# Turn on the RewriteEngine
RewriteEngine On
#  Rules
RewriteRule ^(Templates|Ressources)($|/) - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . index.php

有人能告诉我如何在ordre的hhvm.hdf文件中配置VirutalHost来实现这个目标吗?

1 个答案:

答案 0 :(得分:3)

您可以尝试 AllowedDirectories VirtualHost 的组合:

AllowedDirectories {
    * = Templates
    * = Ressources
}

VirtualHost {
    * {
        Pattern = .*
        RewriteRules {
            * {
                 pattern = ^(.*)$
                 to = index.php$1
                 qsa = true
            }
        }
    }
}