Author Topic: Site set up  (Read 3204 times)

Offline Sam_78

  • Sr. Member
  • ****
  • Posts: 270
  • Karma: +42/-1
    • View Profile
Site set up
« on: December 28, 2018, 02:23:54 PM »
I guess this question has been answered but I couldn't find the right way of doing this so let me ask one more time
How to set up https correctly
In admin panel system->settings->store details
Store URL =     HTTP     http://www.mysite.com/
Secure Store URL =    HTTPS     https://www.mysite.com/

I do have Enable SEO turned on and my .htaccess looks like this
RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.mysite.com/$1 [R,L]


when I do this I get error on chrome and other browser saying to many redirects
when I comment last line
#RewriteRule ^(.*)$ https://www.mysite.com/$1 [R,L]

It works fine. Hosting people said issue is with the software and redirects. I don't have anything else in my htaccess or any other redirects I just want to send everyone to https://www.mysite.com/

Offline abantecart

  • Administrator
  • Hero Member
  • *****
  • Posts: 4358
  • Karma: +298/-10
    • View Profile
    • Ideal Open Source Ecommerce Solution
Re: Site set up
« Reply #1 on: December 30, 2018, 11:13:42 PM »
I am not very clear what the issue is.

What do you try to do with server pot redirect? Why did you put pot 80 for redirect?
Do you need to have https all the time?

You can have store URL to be https as well:
Store URL =     HTTP     https://www.mysite.com/
Secure Store URL =    HTTPS     https://www.mysite.com/
Please  rate your experience or leave your review
We need your help to build better free open source ecommerce platform for everyone. See how you can help

Offline Sam_78

  • Sr. Member
  • ****
  • Posts: 270
  • Karma: +42/-1
    • View Profile
Re: Site set up
« Reply #2 on: January 02, 2019, 10:46:58 AM »
I am not very clear what the issue is.

What do you try to do with server pot redirect? Why did you put pot 80 for redirect?
Do you need to have https all the time?

You can have store URL to be https as well:
Store URL =     HTTP     https://www.mysite.com/
Secure Store URL =    HTTPS     https://www.mysite.com/

Ok so the best way to setup a store is

Store URL =     HTTP     https://www.mysite.com/
Secure Store URL =    HTTPS     https://www.mysite.com/

my .htaccess should be like this for https
RewriteEngine On 
RewriteRule ^(.*)$ https://www.mysite.com/$1 [R,L]
/* no port 80*/

This htaccess change says too many redirect so I have commented it though. How can I check redirects? my .htaccess only has one redirect which is
RewriteRule ^(.*)$ https://www.mysite.com/$1 [R,L]

my DNS should be
name = mysite.com , value = 1.1.1.1
name = www , value = 1.1.1.1
/*where value = 1.1.1.1 is IP of my domain */

Is this correct? because without https redirect if I hit mysite.com without www icons such as cart, add button are not loaded



« Last Edit: January 02, 2019, 05:31:34 PM by Sam_78 »

Offline Basara

  • Administrator
  • Hero Member
  • *****
  • Posts: 5774
  • Karma: +274/-2
    • View Profile
Re: Site set up
« Reply #3 on: January 03, 2019, 12:15:46 AM »
In your admin go to Store Settings and set Store Url and Secure Store Url to HTTPS version.
In htaccess try rules like in this example
https://stackoverflow.com/questions/34746385/redirect-all-non-https-request-to-https-request-by-htaccess/34747654#34747654
Quote
Options All -Indexes
   RewriteEngine On
   RewriteBase /
   RewriteCond %{HTTPS} !on
   RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
   #all other rules below 

Take a note you already have few rules like above (remove duplicates)

 

Powered by SMFPacks Social Login Mod