0

私は Magento Web サイトを使用しており、サイトのすべてのページに http と https からアクセスできるため、Google で重複コンテンツの問題が発生している可能性があります。これらのページを除いて、htacces ですべての https ページを http にリダイレクトするための適切なコーディングが必要です。

(これらに個別の例外ルールが必要なのか、前のものに含まれているのかは不明)

  • /checkout/multishipping/addresses/
  • /ウィッシュリスト/インデックス/インデックス/
  • /顧客/アカウント/ログイン/
  • /チェックアウト/ワンページ/成功

誰かが助けていただければ幸いです。ありがとう。

4

1 に答える 1

0

試す:

RewriteEngine On

# From https to http
RewriteCond %{HTTPS} on
RewriteCond %{REQUEST_URI} !^/checkout/onepage/
RewriteCond %{REQUEST_URI} !^/customer/account/
RewriteCond %{REQUEST_URI} !^/checkout/multishipping/login/
RewriteCond %{REQUEST_URI} !^/wishlist/
RewriteCond %{REQUEST_URI} !^/index.php/admin/dashboard/index/key/
RewriteRule ^(.*)$ http://www.example.com/$1 [L,R=301]

# From http to https
RewriteCond %{HTTPS} off
RewriteCond %{REQUEST_URI} ^/checkout/onepage/ [OR]
RewriteCond %{REQUEST_URI} ^/customer/account/ [OR]
RewriteCond %{REQUEST_URI} ^/checkout/multishipping/login/ [OR]
RewriteCond %{REQUEST_URI} ^/wishlist/ [OR]
RewriteCond %{REQUEST_URI} ^/index.php/admin/dashboard/index/key/
RewriteRule ^(.*)$ https://www.example.com/$1 [L,R=301]
于 2013-05-01T01:31:00.353 に答える