Post by amasood86 » Mon Feb 05, 2018 6:21 pm

I have migrated my site to hostgator with ssl hostgator team said as below

"Unfortunately I have tried my best to solve your problem but I have exhausted all troubleshooting methods available to me. You may need to edit all your code find and replace all http:// with https:// "

please help me in this regard
I noticed admin panel is working correctly with icons are missing but on main site ssl is not working and icons are missing

New member

Posts

Joined
Tue Jul 04, 2017 12:01 am

Post by amasood86 » Mon Feb 05, 2018 6:21 pm


New member

Posts

Joined
Tue Jul 04, 2017 12:01 am

Post by maier » Mon Feb 05, 2018 7:47 pm

The 1st try is the config.php ...
// HTTP
define('HTTP_SERVER', 'https://dunyatradehub.com/');

// HTTPS
define('HTTPS_SERVER', 'https://dunyatradehub.com/');

Quick, professional OpenCart Partner-Support in AT, CH, DE and RU.
OpenCart Extensions, Support & Development


User avatar
New member

Posts

Joined
Sat Sep 22, 2012 1:17 am
Location - St. Petersburg, Russian Federation

Post by amasood86 » Mon Feb 05, 2018 9:23 pm

maier wrote:
Mon Feb 05, 2018 7:47 pm
The 1st try is the config.php ...
// HTTP
define('HTTP_SERVER', 'https://dunyatradehub.com/');

// HTTPS
define('HTTPS_SERVER', 'https://dunyatradehub.com/');
I have already done it please check

<?php
// HTTP
define('HTTP_SERVER', 'http://www.dunyatradehub.com/');

// HTTPS
define('HTTPS_SERVER', 'https://www.dunyatradehub.com/');

admin config

<?php
// HTTP
define('HTTP_SERVER', 'http://www.dunyatradehub.com/admin191086910-2017/');
define('HTTP_CATALOG', 'http://www.dunyatradehub.com/');

// HTTPS
define('HTTPS_SERVER', 'https://www.dunyatradehub.com/admin191086910-2017/');
define('HTTPS_CATALOG', 'https://www.dunyatradehub.com/');

New member

Posts

Joined
Tue Jul 04, 2017 12:01 am

Post by uksitebuilder » Mon Feb 05, 2018 10:43 pm

Are you wanting your whole site to be SSL ?

If so, you can change all URLs in your config.php and admin/config.php to be https (including the HTTP_SEVER etc)

Secondly, something is forcing non-www on your server, however your config files all state the www subdomain as being the one to use.

I am guessing it is your .htaccess file

You should decide what you want to use (either with www or without) then specify that in your config files and also change whatever is forcing non-www to suit.

ImageImageImageImageImage

For Friendly Professional Support - Click Here


User avatar
Guru Member

Posts

Joined
Thu Jun 09, 2011 11:37 pm
Location - United Kindgom

Post by amasood86 » Tue Feb 06, 2018 2:07 pm

uksitebuilder wrote:
Mon Feb 05, 2018 10:43 pm
Are you wanting your whole site to be SSL ?

If so, you can change all URLs in your config.php and admin/config.php to be https (including the HTTP_SEVER etc)

Secondly, something is forcing non-www on your server, however your config files all state the www subdomain as being the one to use.

I am guessing it is your .htaccess file

You should decide what you want to use (either with www or without) then specify that in your config files and also change whatever is forcing non-www to suit.
here is my .htaccess file, i have made changes in config file as

// HTTP
define('HTTP_SERVER', 'https://www.dunyatradehub.com/');

// HTTPS
define('HTTPS_SERVER', 'https://www.dunyatradehub.com/');

here is admin config

// HTTP
define('HTTP_SERVER', 'https://www.dunyatradehub.com/admin/');
define('HTTP_CATALOG', 'https://www.dunyatradehub.com/');

// HTTPS
define('HTTPS_SERVER', 'https://www.dunyatradehub.com/admin/');
define('HTTPS_CATALOG', 'https://www.dunyatradehub.com/');

here is .htaccess, now what is happening is icons are not showing up on site

# 1.To use URL Alias you need to be running apache with mod_rewrite enabled.

# 2. In your opencart directory rename htaccess.txt to .htaccess.

# For any support issues please visit: http://www.opencart.com

# For security reasons, Option followsymlinks cannot be overridden.
Options +FollowSymlinks
Options +SymLinksIfOwnerMatch

# Prevent Directoy listing
Options -Indexes

# Prevent Direct Access to files
<FilesMatch "(?i)((\.tpl|.twig|\.ini|\.log|(?<!robots)\.txt))">
Require all denied
## For apache 2.2 and older, replace "Require all denied" with these two lines :
# Order deny,allow
# Deny from all
</FilesMatch>

# SEO URL Settings
RewriteEngine On
# If your opencart installation does not run on the main web folder make sure you folder it does run in ie. / becomes /shop/
RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://dunyatradehub.com/$1 [R=301,L]
RewriteBase /
RewriteRule ^sitemap.xml$ index.php?route=extension/feed/google_sitemap [L]
RewriteRule ^googlebase.xml$ index.php?route=extension/feed/google_base [L]
RewriteRule ^system/storage/(.*) index.php?route=error/not_found [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !.*\.(ico|gif|jpg|jpeg|png|js|css)
RewriteRule ^([^?]*) index.php?_route_=$1 [L,QSA]


### Additional Settings that may need to be enabled for some servers
### Uncomment the commands by removing the # sign in front of it.
### If you get an "Internal Server Error 500" after enabling any of the following settings, restore the # as this means your host doesn't allow that.

# 1. If your cart only allows you to add one item at a time, it is possible register_globals is on. This may work to disable it:
# php_flag register_globals off

# 2. If your cart has magic quotes enabled, This may work to disable it:
# php_flag magic_quotes_gpc Off

# 3. Set max upload file size. Most hosts will limit this and not allow it to be overridden but you can try
# php_value upload_max_filesize 999M

# 4. set max post size. uncomment this line if you have a lot of product options or are getting errors where forms are not saving all fields
# php_value post_max_size 999M

# 5. set max time script can take. uncomment this line if you have a lot of product options or are getting errors where forms are not saving all fields
# php_value max_execution_time 200

# 6. set max time for input to be recieved. Uncomment this line if you have a lot of product options or are getting errors where forms are not saving all fields
# php_value max_input_time 200

# 7. disable open_basedir limitations
# php_admin_value open_basedir none

New member

Posts

Joined
Tue Jul 04, 2017 12:01 am

Post by uksitebuilder » Tue Feb 06, 2018 3:40 pm

Hi

As you have set the domain to be the www version, you need to set the redirect in .htaccess to match

Change:

RewriteRule ^(.*)$ https://dunyatradehub.com/$1 [R=301,L]

To

RewriteRule ^(.*)$ https://www.dunyatradehub.com/$1 [R=301,L]

ImageImageImageImageImage

For Friendly Professional Support - Click Here


User avatar
Guru Member

Posts

Joined
Thu Jun 09, 2011 11:37 pm
Location - United Kindgom

Post by amasood86 » Tue Feb 06, 2018 4:54 pm

uksitebuilder wrote:
Tue Feb 06, 2018 3:40 pm
Hi

As you have set the domain to be the www version, you need to set the redirect in .htaccess to match

Change:

RewriteRule ^(.*)$ https://dunyatradehub.com/$1 [R=301,L]

To

RewriteRule ^(.*)$ https://www.dunyatradehub.com/$1 [R=301,L]
I did it now, but i can't see any icons on my site https://www.dunyatradehub.com/

can you please see if there is any other issue on my config and htaccess files?

New member

Posts

Joined
Tue Jul 04, 2017 12:01 am

Post by uksitebuilder » Tue Feb 06, 2018 6:07 pm

All looks fine to me now

ImageImageImageImageImage

For Friendly Professional Support - Click Here


User avatar
Guru Member

Posts

Joined
Thu Jun 09, 2011 11:37 pm
Location - United Kindgom

Post by amasood86 » Tue Feb 06, 2018 7:58 pm

uksitebuilder wrote:
Tue Feb 06, 2018 6:07 pm
All looks fine to me now
Thanks you so much for your guidance

New member

Posts

Joined
Tue Jul 04, 2017 12:01 am
Who is online

Users browsing this forum: No registered users and 18 guests