Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have an Apache virtual host for a project I have done using Silex which is based on Symfony2 however the routing works fine with the modrewrite rules but all calls to javascript or css seem to turn into routes to a controller. Could you help me with the virtual host please.

Options -MultiViews
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ /index.php [L]
DocumentRoot /var/www/html/site/www
share|improve this question
Where's this configuration? – Shane Madden Apr 23 '12 at 17:35
in the httpd.conf – Oliver Bayes-Shelton Apr 23 '12 at 17:39
up vote 2 down vote accepted

%{REQUEST_FILENAME} is relative the the DocumentRoot. The above works within a <Directory...> block (or .htaccess file). Try changing it to:

RewriteEngine On
RewriteRule .* /index.php [L]
share|improve this answer
Perfect thank you very much :) – Oliver Bayes-Shelton Apr 23 '12 at 18:22

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.