0

I have this code on my site and I need to redirect the http://softsolutions.fr to http://www.softsolutions.fr, but it is not redirecting:

<IfModule mod_rewrite.c>    
  Options +FollowSymlinks
  Options +Indexes
  RewriteEngine On

    RewriteCond %{HTTP_HOST} ^softsolutions\.fr
    RewriteRule ^(.*)$ http://www.softsolutions.fr/index.html [R=301,L]     

  RewriteRule    ^$    /index.html    [L]

    # Rewrites "sub.domain.foo/anything" to "sub.domain.foo/anything.php"
    RewriteCond %{REQUEST_FILENAME} !^(.+).php$
    RewriteCond %{REQUEST_FILENAME} !^(.+).pdf$
    RewriteCond %{REQUEST_FILENAME} !^(.+).(html|htm)$
    RewriteRule    ^([a-zA-Z0-9\-\_/]*)$    /$1.php    [L]  

</IfModule>
ronymattar
  • 149
  • 3
  • 14

1 Answers1

0

Replace those lines:

RewriteEngine On

RewriteCond %{HTTP_HOST} ^softsolutions\.fr
RewriteRule ^(.*)$ http://www.softsolutions.fr/index.html [R=301,L] 

With:

RewriteEngine On
RewriteBase /

RewriteCond %{HTTP_HOST} ^softsolutions\.fr [NC]
RewriteRule (.*) http://www.%{HTTP_HOST}%{REQUEST_URI}
Ghassan Elias
  • 2,213
  • 1
  • 14
  • 17