I needed slim php to work with pretty urls using .htaccess
, well no problem.
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [QSA,L]
Now I ran this using hhvm, fastcgi using this virtual host config.
<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>
Of course, it won't read the .htaccess file, I thought of adding the .htaccess
config in virtual host config, but no, it won't work.
Like so:
<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>
index.php
in a config. It work just fine if on normal php files, so access and error logs don't log anything that has something to do with it. – SmaragditeServerALias
a typo? (ALias instead of Alias) – Chestnut