Post by hamidg84 » Wed May 17, 2017 7:19 pm

Hi

When we type in www.xyz.co.uk, padlock is not displayed
when we type xyz.co.uk, padlock is displayed.

We have made all required changes in config.php.

What could be the fix please?

Active Member

Posts

Joined
Wed Feb 29, 2012 6:18 am

Post by Qphoria » Wed May 17, 2017 9:41 pm

Your ssl certificate must support both www and nonwww. Not all ssl certs support both ways. Figure out which way you want it to be and use htaccess to force it that way. Add one of these under the "RewriteEngine On" line of your .htaccess file

To force all non-www to goto www

Code: Select all

RewriteCond %{HTTP_HOST} ^(?!www\.)(.+) [NC]
RewriteRule ^(.*) http://www.%1/$1 [R=301,NE,L]
To force all www to goto non-www

Code: Select all

RewriteCond %{HTTP_HOST} ^www\.(.+) [NC]
RewriteRule ^(.*) http://%1/$1 [R=301,NE,L]

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by xxvirusxx » Wed May 17, 2017 10:09 pm

I use this:

Code: Select all

RewriteCond %{HTTP_HOST} ^website\.com$ [OR]
RewriteCond %{HTTP_HOST} ^www\.website\.com$
RewriteRule ^(.*)$ "https\:\/\/www\.website\.com\/$1" [R=301,L]

My converted modules | Opencart 3.0.3.3 |Buy me a beer | Contact me on Skype


User avatar
Expert Member

Posts

Joined
Tue Jul 17, 2012 10:35 pm
Location - RO
Who is online

Users browsing this forum: No registered users and 18 guests