0

私のサイトにこのコードがあり、http://softsolutions.frhttp://www.softsolutions.frにリダイレクトする必要がありますが、リダイレクトされません。

<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>
4

1 に答える 1

0

これらの行を置き換えます。

RewriteEngine On

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

と:

RewriteEngine On
RewriteBase /

RewriteCond %{HTTP_HOST} ^softsolutions\.fr [NC]
RewriteRule (.*) http://www.%{HTTP_HOST}%{REQUEST_URI}
于 2012-10-05T14:47:35.650 に答える