Re: Redirecting an Image/PDF Link

Anonymous
Not applicable
I know how to redirect a landing page but I dont see how to redirect the URL for an uploaded image or PDF. Can this be done? How so?

Thanks
Tags (1)
10 REPLIES 10
SanfordWhiteman
Level 10 - Community Moderator
OK, I hope you find something that fits your workflow.
Anonymous
Not applicable
We wouldnt want to do that because it makes my team reliant upon me to build them a landing page. Plus I would have to update the LP to change the URL too. I think we will need to strat hosting images and PDFs elsewhere to do what we need to do.
SanfordWhiteman
Level 10 - Community Moderator
Well, serving PDFs from landing pages would be the way to go.  But you would've had to do this from the start.
 
Anonymous
Not applicable
Use case is this:
- We changed the name of our product so we want the URLs to change for the PDFs. So we can replac the PDF with the new one, then a re-direct would save us the pain of going to find every single instance of the PDF to update the link.
- Same with image, we have auniversal change to an image and instead of finding every locaton of the old image, a re-direct would be much easier.

 
Jenn_DiMaria2
Level 10
I'm not sure what your use case is, but is this something that can be done by replacing your URLs with Program-level tokens? Then you could just go into the tokens and update them as needed, which will automatically update all links (landing page, images, PDFs, and otherwise) in all future emails.
SanfordWhiteman
Level 10 - Community Moderator
It's the most basic Javascript imaginable:
 
<script>
document.location.href = "http://pages.example.com/a_very_special.pdf";
</script>

However I know any code can make non-coders nervous (which isn't really a bad thing).

I still don't really understand the use case for images, though. PDFs I can understand (if you want to make sure that if people use an old PDF link it links to updated data).
Anonymous
Not applicable
Would I have to know javascript to do that? I dont know html either. Sounds like Marketo cannot do a redirect of image/PDF URLs for some reason. Thanks anyways!
SanfordWhiteman
Level 10 - Community Moderator
@ChristinaPappas if you want to manage access URLs for a static asset, set up a landing page that does a javascript redirect to the asset's URL.  Then manage redirects at the LP level like @Josh said.

Note the asset will still be available via its direct URL, so you want to publish the LP URL(s) only.

EDIT: To be clear, this works easily for downloadable assets such as PDFs.  If you want to swap images embedded in a landing page, it isn't that simple, because <IMG> tags won't follow a JS redirect.  You can swap the image.src value at page load.  I guess I'd need to know more about the exact situation in which you'd need to do this instead of (a) replacing the image that's at a given URL in the library or (b) changing the URL in the <IMG> tag.
Anonymous
Not applicable
Thanks  but I looked there. If I need the URLs to be changed. Updating the images is easy but the URLs are now incorrect and I dont see any easy way to do this. No re-direct on image/PDFs links is a killer!
Josh_Hill13
Level 10 - Champion Alumni
Go to admin>landing pages > rules

but you may not be able to do this well for PDFs or images. If you need to replace them, do so in the Images & Files area.