Our site www.viart.com site is operated by latest Viart Shop 5 with default Clear design
Topic Information
lockmaster
lockmaster
Looking to make our site always https. How do we get all our existing images to have https url?
 
daviswe
daviswe
I think Google is going to start making all URLS to be https.
 
Alan_G
Alan_G
On an apache server you can add the following to your .htaccess file
 
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
 
If you are using friendly urls the .htaccess file looks like
 
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /friendly_url.php [L]
</IfModule>
 
This assumes you already have an SSL cert and dedicated IP
Hope this helps.
Alan G
Last modified: 19 Apr 2017 9:29 AM
 
Metz
Metz
daviswe,
 
Please let me know if you run into any issues with this. I need to do that to my site too.
 
thanks!
 
:)
 
DomIII
DomIII
Is there a script to change the image URL's to HTTPS:?
 
It will be a pain to edit all the images. Google is giving a mixed content error on our pages.
 
freezer
freezer
I recently switched to total https. I had to therefore make all images have https urls
 
It is possible to connect to the relevant tables via ODBC. I used Microsoft Access and then used the built in find and replace function (set to any part of field) in all relevant columns e.g http replace with https
 
If this is not an option you could select all products in each product category in Viart Admin and click 'edit selected'. Then choose fields small, medium and large images and change manually there.
 
A bit quicker than going into each product 1 by 1 but not ideal.
 
I think you can export products and re-import giving the option to edit in spreadsheet in between but have never done that so wont advise on that one.
 
Maybe somebody on this forum could advise on a suitable SQL to use in the SQL query form to the manipulate directly in the tables where the images are located.
 
Just some ideas
 
Dave
 
Vito
Vito
For fast update all images for your products you will need to run two queries below
 
UPDATE va_items SET
tiny_image=REPLACE(tiny_image,'http://','https://'),
small_image=REPLACE(small_image,'http://','https://'),
big_image=REPLACE(big_image,'http://','https://'),
super_image=REPLACE(super_image,'http://','https://')
 
UPDATE va_items_images SET
image_tiny=REPLACE(image_tiny,'http://','https://'),
image_small=REPLACE(image_small,'http://','https://'),
image_large=REPLACE(image_large,'http://','https://'),
image_super=REPLACE(image_super,'http://','https://')
 
DomIII
DomIII
Has anyone used Vito's script to update the images and has it worked?