Forums / Installing on a Linux/Unix Server / Need www on URL to show to use SSL certificate

Need www on URL to show to use SSL certificate

Locked

Views: 1,317

Results 1 to 2 of 2
This thread is locked. New replies are disabled.
3 Feb 2009, 6:09 PM
#1
mattbuk avatar

mattbuk

New Zenner

Join Date:
Feb 2009
Posts:
9
Plugin Contributions:
0

Need www on URL to show to use SSL certificate

I am in the middle of developing a Zencart site and just purchased a SSL Certificate in the form of https://www.mysite.co.uk.

However once I have enabled the site to use SSL it is looking for the the certificate in the form of just mysite.co.uk with no www.

I have spoke to the hosting company to try and change this but they said that it is best and most common to use the https://www.mysite.co.uk format and to go into the settings and specify zencart to use a www. prefix.

I have tried forcing the site to do this using this code in the htdocs

RewriteEngine On
RewriteCond %{HTTP_HOST} ^mysite.co.uk$
RewriteRule ^(.*)$ http://www.mysite.co.uk/$1 [R=301,L]

But the site will not work properly in the checkout it just refreshes the 1st page

Is there a setting in Zencart which can change the entire site to use www or a simple way of doing it that will make the site still work?

I am using 1.3.8 and the basic credit card module

3 Feb 2009, 6:55 PM
#2
barco57 avatar

barco57

Totally Zenned

Join Date:
Apr 2006
Location:
West Salem, IL
Posts:
2,845
Plugin Contributions:
0

Re: Need www on URL to show to use SSL certificate

In the includes/configure.php and admin/includes/configure.php make sure the defines for 'HTTP_SERVER' and 'HTTPS_SERVER' have the www. in them

Mike
AEIIA - Zen Cart Certified & PCI Compliant Hosting
The Zen Cart Forum...Better than a monitor covered with post-it notes!