我需要使用苗条的php来处理使用.htaccess
的漂亮网址,没问题。
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [QSA,L]
现在我使用hhvm,fastcgi使用这个虚拟主机配置来运行它。
<VirtualHost *:80>
ServerName project.dev
ServerALias www.project.dev
DocumentRoot /var/www/project
ProxyPassMatch ^/(.*\.php(/.*)?)$ fcgi://127.0.0.1:9000/var/www/project/$1
<Directory "/var/www/project">
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
当然,它不会读取.htaccess文件,我想在虚拟主机配置中添加.htaccess
配置,但不,它不会工作。
像这样:
<VirtualHost *:80>
ServerName project.dev
ServerALias www.project.dev
DocumentRoot /var/www/project
ProxyPassMatch ^/(.*\.php(/.*)?)$ fcgi://127.0.0.1:9000/var/www/project/$1
<Directory "/var/www/project">
AllowOverride All
Order allow,deny
Allow from all
</Directory>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [QSA,L]
</VirtualHost>