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

This is my .htaccess file for Symfony PHP framework project:

  RewriteEngine On

  RewriteBase /

  RewriteCond %{REQUEST_URI} \..+$
  RewriteCond %{REQUEST_URI} !\.html$
  RewriteRule (.*) - [L]

  RewriteCond %{HTTP_HOST} ^
  RewriteRule (.*)$1 [R=301,L]

  RewriteRule ^index\.php ./ [R=301,L]

  RewriteRule ^(.*)$ index.php [QSA,L]

The one before last line not working at all. Any idea why?

share|improve this question
Can you please explain exactly what the problem is. – Drew Khoury Apr 6 '13 at 0:01

If you're just after requests for to be rewritten to then try it without the fullstop

RewriteRule ^index\.php / [R=301,L]

Syntax: RewriteRule Pattern Substitution [flags]

The Substitution of a rewrite rule is the string that replaces the original URL-path that was matched by Pattern. The Substitution may be a:

  • file-system path
  • URL-path
  • Absolute URL
  • (dash)
share|improve this answer
There is no difference :( – Piotr Apr 5 '13 at 19:07

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.