AbanteCart Community
Shopping Cart Operations => Support => General Support => Topic started by: Sam_78 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/
-
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/
-
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
-
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
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)