Page 1 of 1

Broken image URL after enabling SSL

Posted: Fri Mar 02, 2018 3:43 am
by ripper
hi,
I have OC 2.2.0.0, Journal, SEO Mega Kit. Journal cache deleted. After enabling SSL, modifying config files I have broken image URLs not showing https so it is not displaying these images. I have forced SSL to be used always.

Any help?

Regards
Ladislav

Re: Broken image URL after enabling SSL

Posted: Fri Mar 02, 2018 3:53 am
by IP_CAM
Well, no help is possible without posting a Link. ::)
It's a tech place here, not an esoteric heaven.
Ernie

Re: Broken image URL after enabling SSL

Posted: Fri Mar 02, 2018 6:35 pm
by paulfeakins
ripper wrote:
Fri Mar 02, 2018 3:43 am
modifying config files
Change all HTTP to HTTPS in both config files.

Also post a link.

Re: Broken image URL after enabling SSL

Posted: Tue May 15, 2018 3:30 am
by ripper
hi,
of course I use https in config.php. Maybe there is something wrong with .htaccess? I can't let it be like this because it is live eshop.

Image

Image
# 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

# Options +FollowSymlinks

# Prevent Directoy listing
Options -Indexes

# Prevent Direct Access to files
<FilesMatch "(?i)((\.tpl|\.ini|\.log|(?<!robots)\.txt))">
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/

RewriteCond %{HTTPS} !=on
# This checks to make sure the connection is not already HTTPS

RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L]

Re: Broken image URL after enabling SSL

Posted: Tue May 15, 2018 8:17 am
by IP_CAM

Code: Select all

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/
Well, where is your RewriteEngine Command Line ? ???
Ernie

Re: Broken image URL after enabling SSL

Posted: Wed May 16, 2018 12:30 am
by ripper
hi,
I don't understand .htaccess. So what is there wrong? ???

Re: Broken image URL after enabling SSL

Posted: Wed May 16, 2018 3:41 am
by IP_CAM
Well, one should better no play around with code, if one does not know, what
one is doing. But if one wants to find out, GOOGLE is FULL of such Information.
That's the whole thing, including the RewriteBase / Line:

Code: Select all

# 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/
RewriteBase /
Ernie

Re: Broken image URL after enabling SSL

Posted: Thu May 17, 2018 3:02 am
by ripper
hi,
that didn't help, the situation is the same. And when I click on any category I get this:

Image

Re: Broken image URL after enabling SSL

Posted: Thu May 17, 2018 3:55 am
by victorj
oc 2.2.0.0 has a huge problem when trying to run ssl
a solution is given here

viewtopic.php?f=190&t=182662&p=669287&h ... ix#p669287

Make sure you also set admin to ssl, otherwise admin sets images to http instead of https

Re: Broken image URL after enabling SSL

Posted: Fri May 18, 2018 1:35 am
by ripper
hi,
tried everything and still not working :(

Re: Broken image URL after enabling SSL

Posted: Thu May 24, 2018 4:51 pm
by ocguru
Hi, I can fix this issue. Please PM me.

Re: Broken image URL after enabling SSL

Posted: Sat May 26, 2018 4:50 pm
by ravikumar22
Hi, I think all replied answer is wrong above. I don't know why people do not guide correctly. A dumb people can see image URL of the site is not correct. if you see image URL of the logo is without SSL like this .https://www.sperkyaja.cz/image/cache/sp ... 18x418.png after enabling SSL. it is http://www.sperkyaja.cz/image/image/cac ... 18x418.png. it means it is clear. that you have added code in htaccess that is adding "/image" to every image. so due to wrong URL. all site have not image displaying. this thing can be also like this. that if you have put some javascript that changes the URL of site image after enabling SSL. I found you have some page is also not working after enabling SSL. it can be the same solution. so it is the very simple thing. if you still getting the problem. let me know. I will quickly help you. Don't worry I will help you FREE OF COST. so feel free to ask me anything. I love to help people in opencart. SEE attached image.Image
ripper wrote:
Tue May 15, 2018 3:30 am
hi,
of course I use https in config.php. Maybe there is something wrong with .htaccess? I can't let it be like this because it is live eshop.

Image

Image
# 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

# Options +FollowSymlinks

# Prevent Directoy listing
Options -Indexes

# Prevent Direct Access to files
<FilesMatch "(?i)((\.tpl|\.ini|\.log|(?<!robots)\.txt))">
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/

RewriteCond %{HTTPS} !=on
# This checks to make sure the connection is not already HTTPS

RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L]

Re: Broken image URL after enabling SSL

Posted: Thu Aug 16, 2018 4:34 pm
by ripper
hi,
in Admin section I can see all images.
My .htaccess. Is there something wrong?

Code: Select all

# 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

# Options +FollowSymlinks

# Prevent Directoy listing
Options -Indexes

# Prevent Direct Access to files
<FilesMatch "(?i)((\.tpl|\.ini|\.log|(?<!robots)\.txt))">
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/

RewriteRule ^sitemap.xml$ index.php?route=feed/google_sitemap [L]
RewriteRule ^googlebase.xml$ index.php?route=feed/google_base [L]
RewriteRule ^system/download/(.*) index.php?route=error/not_found [L]
RewriteRule ^image-smp/(.*) index.php?route=product/smp_image&name=$1 [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]

#RewriteCond %{HTTP_HOST} ^sperkyaja.cz$ [NC]
# RewriteCond %{HTTPS} off
#RewriteRule ^/?$ http://www.sperkyaja.cz/ [R=301,L]
# RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

#RewriteCond %{HTTPS} on
#RewriteRule http://.*\.jpg$ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
#RewriteRule http://.*\.jpeg$ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

### 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

Re: Broken image URL after enabling SSL

Posted: Fri Aug 17, 2018 2:03 pm
by ravikumar22
hi riper,
this problem is very unique and everyone should know this answer so I posting its answer publicly. Let me explain the problem and its answer. Your all htaccess code is correct. there is no problem anywhere. only the thing is did by your developer or by you is you disabled # Options +FollowSymlinks this. since this line code does exactly that you need with your site url and its other link that is associated following site url. I know why this code is disabled. since if you enable this site will give 500 ERROR. it should to be enabled. since you or anyone or maybe by your server Check to make sure that your httpd.conf file has AllowOverride All. setting is disabled.
I am giving you some link about this setting in detail. how you can enable this. and where you can found this all settings.
Let me know if you still getting this problem.
https://stackoverflow.com/questions/121 ... owsymlinks
https://www.phusionpassenger.com/librar ... _file.html
ripper wrote:
Thu Aug 16, 2018 4:34 pm
hi,
in Admin section I can see all images.
My .htaccess. Is there something wrong?

Code: Select all

# 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

# Options +FollowSymlinks

# Prevent Directoy listing
Options -Indexes

# Prevent Direct Access to files
<FilesMatch "(?i)((\.tpl|\.ini|\.log|(?<!robots)\.txt))">
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/

RewriteRule ^sitemap.xml$ index.php?route=feed/google_sitemap [L]
RewriteRule ^googlebase.xml$ index.php?route=feed/google_base [L]
RewriteRule ^system/download/(.*) index.php?route=error/not_found [L]
RewriteRule ^image-smp/(.*) index.php?route=product/smp_image&name=$1 [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]

#RewriteCond %{HTTP_HOST} ^sperkyaja.cz$ [NC]
# RewriteCond %{HTTPS} off
#RewriteRule ^/?$ http://www.sperkyaja.cz/ [R=301,L]
# RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

#RewriteCond %{HTTPS} on
#RewriteRule http://.*\.jpg$ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
#RewriteRule http://.*\.jpeg$ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

### 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

Re: Broken image URL after enabling SSL

Posted: Sat Aug 18, 2018 9:53 am
by IP_CAM
Your all htaccess code is correct. there is no problem anywhere.
Well, you force me to temporary break my silence, but your Information if NOT correct,
the REWRITE BASE Line is missing, and therefore, this Place will not work. :'(
As I already mentioned above ...
Ernie
# SEO URL Settings
RewriteEngine On
RewriteBase /

Re: Broken image URL after enabling SSL

Posted: Sat Aug 18, 2018 3:06 pm
by ripper
IP_CAM wrote:
Sat Aug 18, 2018 9:53 am
Your all htaccess code is correct. there is no problem anywhere.
Well, you force me to temporary break my silence, but your Information if NOT correct,
the REWRITE BASE Line is missing, and therefore, this Place will not work. :'(
As I already mentioned above ...
Ernie
# SEO URL Settings
RewriteEngine On
RewriteBase /
hi,
# SEO URL Settings
RewriteEngine On
RewriteBase /


is there in place, the situation is the same. :(

Re: Broken image URL after enabling SSL

Posted: Wed Sep 19, 2018 2:32 am
by ripper
is there anybody who can help me? Sure I can pay for it.

Re: Broken image URL after enabling SSL

Posted: Wed Sep 19, 2018 2:36 am
by victorj
PM send