2013-05-01 1 views
0

Magento 웹 사이트를 사용하고 있으며 사이트의 모든 페이지에 http 및 https를 통해 액세스 할 수 있으며 이로 인해 Google에 중복 콘텐츠 문제가 발생할 수 있습니다.일부 예외가있는 .htacces에서 https를 http로 리디렉션

  • https://www.example.com/checkout/onepage/
  • /고객/계정/
  • /체크 아웃/multishipping/로그인/
  • : 나는이 페이지를 제외하고 http로 htacces의 모든 HTTPS 페이지를 리디렉션에 대한 적절한 코딩이 필요/위시리스트/
  • /index.php/admin/dashboard/index/key/

(확실하지 당신이 아니면 내가 대한 별도의 예외 규칙을 필요로하는 경우 t)는 이전의 것들에 포함/성공 onepage

  • /체크 아웃/multishipping/주소/
  • /위시리스트/인덱스/색인/
  • /고객/계정/로그인/
  • /체크 아웃/

누구든지 도움을 주시면 대단히 감사하겠습니다. 감사.

답변

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] 
+0

내가해야 페이지에 액세스하려고 할 때 나는 당신이 HTTP 제대로 리디렉션 것 https로 그것을 시도 경우와 사이트의 모든 일반 페이지를했지만, 예를 들어 위시리스트 페이지의 보안을 유지했습니다. 페이지가 초당 https로 변경된 다음 홈 페이지로 리디렉션 된 것을 확인했습니다. 이 코드를 입력하기 전에 보안이 필요한 페이지가 이미 https로 리디렉션 되었기 때문일 수 있습니다. 아니면 htacces 코딩에 어떤 종류의 충돌이 있습니까? htacces 파일을보고 싶다면 업로드 할 수 있습니다. –