What's the best way to change all product pages to SSL?
I thought maybe something like this?
Code: Select all
<file name="system/library/url.php">
<operation>
<search position="replace"><![CDATA[
if ($connection == 'NONSSL') {
]]></search>
<add><![CDATA[
if ($route == 'product/product') {
$url = $this->ssl;
} elseif ($connection == 'NONSSL') {
]]></add>
</operation>
</file>
Would it be simpler to replace:
Code: Select all
if ($connection == 'NONSSL') {
$url = $this->url;
} else {
$url = $this->ssl;
}
Code: Select all
$url = $this->ssl;
Code: Select all
RewriteCond %{HTTPS} off
RewriteCond %{HTTP_HOST} ^domain.com$ [NC]
RewriteRule ^(.*) https://www.domain.com/$1 [R=301,L]