Redirects on Uploaded Files

Highlighted
New Member
2 0 0

We're almost finished setting up redirects for our old pages (just transferred to Shopify). We have a few links left, all of which are PDF's. The problem is when we upload these PDF's to the file section, they are uploaded with a URL that starts with:

http://cdn.shopify.com/s/files/1/0403/5641/files/THEPDF.pdf

Since the redirect functionality in Shopify seems to be quite limited (not allowing bulk redirects and forcing you to use the domain of the store, I'm not sure how to set up a redirect for the file above.

For example:

A redirect for About Us would look like this:

http://www.ourdomain.com/OLD-about-us

TO

http://www.ourdomain.com/about-us

A redirect for the PDF above would look like this:

http://www.ourdomain.com/OLD.pdf

TO 

http://www.ourdomain.com/http://cdn.shopify.com/s/files/1/0403/5641/files/THEPDF.pdf

0 Likes
Highlighted
Shopify Staff (Retired)
Shopify Staff (Retired)
959 1 51

Hey Keller,

Actually, this is a common misconception that I should bring up with our admin developers. While it appears that you have to use your domain as a prefix, if you enter a path with an http prefix, it'll point to that URL instead. So it's actually more like:

http://ourdomain.com/old.pdf

to

http://cdn.shopify.com/s/files/1/0195/5922/files/new.pdf

 

Let me know what you think!

Matthew Buttler
Guru
Shopify Inc.

 

0 Likes
Highlighted
New Member
2 0 0

Well, that's good to know! Thank you.

0 Likes
Highlighted
Excursionist
17 1 2

Mathew! Thanks for your help on this. I have a similar issue, but it involves redirecting an uploaded file.

When I go to Settings > Files, there is no way to replace a file at an existing URL.

 

That forces me to delete the old file and upload a new one. (I use this strategy to give people links
in return for subscribing.)

 

But when I upload the new file, delete the old one, and set up a redirect, the old link just keeps working!
Is that because it takes a while for the delete to take effect? (I'm guessing it's in the cache. How often
is that updated?)

 

thanks again!

1 Like
Highlighted
New Member
1 0 0

Okay, but how to redirect one file from http://cdn.shopify...   to other http://cdn.shopify...   ?

0 Likes
Highlighted

Same here, need to redirect an old image file to a new one, both on the Shopify CDN. How is this accomplished?

Monster, creature & cryptozoology patches, buttons & stickers.
0 Likes