views:

88

answers:

0

I’m trying to build a multilingual website (french and english) with proper SEO I’m using Magento 1.4.1.1 with the sample data & the default theme I’m testing locally (MAMP) on the domain : magento.dev (without the www.)

So far I… - Installed the French language package
- Changed the store view codes to fr & en
- Set French as the default store view
- Activated System->Configuration->General->Web->Url Options->Add Store Code to Urls
- Activated System->Configuration->General->Web->Search Engines Optimization->Use Web Server Rewrites

This gives me a working multilingual eCommerce site but for the SEO part it’s not at the level I would like.

1- First I want to fix the WWW 301 redirection

At the moment if I type www.magento.dev I get redirected to magento.dev but with a 302 (not good).

I added the following to the .htaccess file after the RewriteRule .* index.php [L] rule :

RewriteCond %{HTTP_HOST} ^www.magento.dev$ [NC] 
RewriteRule ^(.*)$ http://magento.dev/$1 [R=301,L]

It gives me the 301 redirection I want but only when I go to www.magento.dev

If I go the Furniture categorie (www.magento.dev/fr/furniture.html) I get redirected to http://magento.dev/index.php ???

Someone as a solution for this ?

2- Second I would like to fix the homepage duplicate content

magento.dev and magento.dev/fr/ are the same page!

I tried adding the following to the .htaccess file but I\’m getting the same result as the example above:

RewriteCond %{HTTP_HOST} ^magento.dev$ [NC] 
RewriteRule ^(.*)$ http://magento.dev/fr/$1 [R=301,L]

After if I go to magento.dev I’m getting redirected to http://magento.dev/fr/index.php

Not sure if this can be resolve in the .htaccess file but here's the file provided by Magento

Options +FollowSymLinks
RewriteEngine on

############################################
## you can put here your magento root folder
## path relative to web root

    #RewriteBase /magento/
    #RewriteBase /

############################################
## workaround for HTTP authorization
## in CGI environment

    RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

############################################
## always send 404 on missing files in these folders

    RewriteCond %{REQUEST_URI} !^/(media|skin|js)/

############################################
## never rewrite for existing files, directories and links

    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-l

############################################
## rewrite everything else to index.php

    RewriteRule .* index.php [L]

Thanks!