Cdn Making 301 Redirects For Images When Website Moved To Https

We are getting a strange issue where we use AWS cdn and recently we moved our portal to https ,post that the images/links on the portal which were fetched from CDN are being redirected to the site instead for serving the request.

What could be the issue causing this , some one having any idea ?

http://d1bfnjc0l3c8kj.cloudfront.net/js/tygh/core.js

The .htaccess has this code below to redirect some one who comes from http to https

RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
If we remove this code then some one targetting our site without https remains on http only.
Any ideas ?

We are getting a strange issue where we use AWS cdn and recently we moved our portal to https ,post that the images/links on the portal which were fetched from CDN are being redirected to the site instead for serving the request.

What could be the issue causing this , some one having any idea ?

http://d1bfnjc0l3c8kj.cloudfront.net/js/tygh/core.js

The .htaccess has this code below to redirect some one who comes from http to https

RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
If we remove this code then some one targetting our site without https remains on http only.
Any ideas ?

Could you post a link to your store? Do you use Nginx in front on your website? Looks strange, but I think it might be connected with proxied headers such as X-Forwarded-Proto, X-HTTPS and so forth. So, I need more info for research.

Could you post a link to your store? Do you use Nginx in front on your website? Looks strange, but I think it might be connected with proxied headers such as X-Forwarded-Proto, X-HTTPS and so forth. So, I need more info for research.

The store link is https://www.fleaffair.com, you could test using the above link as well which shows in cs-cart when we configure the cdn. It redirects to the main domain..

The site is hosted on siteground and they do use nginx.

CDN config is as below on AWS:

http://prntscr.com/d2febo

http://prntscr.com/d2fefm

http://prntscr.com/d2felf

The store link is https://www.fleaffair.com, you could test using the above link as well which shows in cs-cart when we configure the cdn. It redirects to the main domain..

The site is hosted on siteground and they do use nginx.

CDN config is as below on AWS:

http://prntscr.com/d2febo

http://prntscr.com/d2fefm

http://prntscr.com/d2felf

Do you use a shared-hosting? If you wish, you can send me credentials to your server in PM to investigate your problem in more details.

We use a cloud server plan on siteground for the same. Can we do a skype session to showcase the same to you instead of giving the credentials of the cpanel ?

We use a cloud server plan on siteground for the same. Can we do a skype session to showcase the same to you instead of giving the credentials of the cpanel ?

SSH access would be better, than Skype session.