Ssl Enabled Maind Domain With Non-Ssl Subdomain

Hi all,



I have 1 storefront located at mydomain.com and another at drops.mydomain.com



My objective is to enable SSL only for mydomain.com and following the KB at CS-Cart Documentation — CS-Cart 4.15.x documentation it seems to be working. But when I browse to drops.mydomain.com; it redirects to mydomain.com



How do I prevent this? Thanks.

hi,



please check 3 possible reasons:


  1. cs-cart block #1
  • please revert changes about making whole store front in HTTPS and check whether [color=#282828][font=arial, verdana, tahoma, sans-serif]drops.mydomain.com is ok or not[/font][/color]

    [color=#282828][font=arial, verdana, tahoma, sans-serif]- if ok, please check reasons #2 and #3[/font][/color]

    [color=#282828][font=arial, verdana, tahoma, sans-serif]- if no, in point #5 of KB article please try these code instead:[/font][/color]


RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.mydomain.com/$1 [R=301,L,NE]
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://drops.mydomain.com/$1 [R=301,L,NE]


2. cs-cart block #2

  • please go to “Administration” → “Stores”
  • choose any store front (one by one) and on “Regions” tab make sure that “Redirect visitors of this storefront to the one that has countries to which the visitors' IP addresses belong defined” setting is disabled


  1. server block

    it is possible that your server redirects [color=#282828][font=arial, verdana, tahoma, sans-serif]drops.mydomain.com to mydomain.com automatically, you should check it with server admin (and remove this redirect if it is configured)[/font][/color]



    [color=#282828][font=arial, verdana, tahoma, sans-serif]best regards,[/font][/color]

    [color=#282828][font=arial, verdana, tahoma, sans-serif]WSA team,[/font][/color]

Hi Damir,



Thanks for the reply. I've followed the steps given and use the following htaccess:



[color=#660066]RewriteCond[/color][color=#000000] [/color][color=#666600]%{[/color][color=#000000]SERVER_PORT[/color][color=#666600]}[/color][color=#000000] [/color][color=#006666]80[/color]

[color=#660066]RewriteRule[/color][color=#000000] [/color][color=#666600]^(.)[/color][color=#000000]$ https[/color][color=#666600]:[/color][color=#880000]//www.mydomain.com/$1 [R=301,L,NE][/color]

[color=#660066]RewriteCond[/color][color=#000000] [/color][color=#666600]%{[/color][color=#000000]SERVER_PORT[/color][color=#666600]}[/color][color=#000000] [/color][color=#006666]80[/color]

[color=#660066]RewriteRule[/color][color=#000000] [/color][color=#666600]^(.
)[/color][color=#000000]$ http[/color][color=#666600]:[/color][color=#880000]//drops.mydomain.com/$1 [R=301,L,NE][/color]



drops.mydomain.com still redirects to the mydomain.com if I enable SSL for mydomain.com



FYI, there's no htaccess file in the subdomain folder. Should I put a htacess file there?

[quote]FYI, there's no htaccess file in the subdomain folder. Should I put a htacess file there? [/quote]



it may mean 2 things:

  1. .htaccess file is hidden by default and your file manager might not show hidden files

    if so, please enable this option and check file existence (if it exists, you should backup old version of file and add new changes).
  2. your server does not use/support .htaccess

    in this case the mentioned rules should be added directly in server redirect rules - to do it, you should contact server administrator



    best regards,

    WSA team