Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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} ^domena.pl
  RewriteRule (.*) www.domena.pl/$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

1 Answer 1

If you're just after requests for domain.com/index.php to be rewritten to domain.com/ then try it without the fullstop

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

http://httpd.apache.org/docs/current/mod/mod_rewrite.html

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

 
discard

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.