我目前正在测试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来实现这个目标吗?
答案 0 :(得分:3)
您可以尝试 AllowedDirectories 和 VirtualHost 的组合:
AllowedDirectories {
* = Templates
* = Ressources
}
VirtualHost {
* {
Pattern = .*
RewriteRules {
* {
pattern = ^(.*)$
to = index.php$1
qsa = true
}
}
}
}