Is it possible to create some redirect rules for pictures and pdfs?

Cecile_Maindron
Level 10

Is it possible to create some redirect rules for pictures and pdfs?

Hi,

Is it possible to create redirect rules for pictures and pdfs? If technically possible, are there some drawbacks (in case pictures have same size)?

Cécile @ Talend
Tags (1)
6 REPLIES 6
Anonymous
Not applicable

Re: Is it possible to create some redirect rules for pictures and pdfs?

Hi,

I don't quite understand what you are trying to achieve?
Cecile_Maindron
Level 10

Re: Is it possible to create some redirect rules for pictures and pdfs?

For instance if we want to update url, picture or pdf and cannot update directly the url (because already posted etc). Instead of updating the source, can I update url and create a redirect from old picture/pdf url to new picture/pdf url.

Anonymous
Not applicable

Re: Is it possible to create some redirect rules for pictures and pdfs?

So you have brochure1.pdf (/images/brochure1.pdf) and instead of just replacing the file with the new version you want to upload a new one, brochure1z.pdf (/images/brochure1z.pdf), and than create a redirect to redirect (/images/brochure1.pdf) to (/images/brochure1z.pdf)?

If this is the case both scenario's would result in seeing the newest brochure with the old url. There's is a difference in statistics though. When redirecting you would be able split the views in old url vs new url.

But the last can also be achieved by using a short-url-service.

I can't imagine any reason for not just overwriting the old file with the new one. But you could add some jQuery code to your landing page template. Where you replace the old url with the new one (perhaps based on naming convention). Not a pretty solution though.

What I ussually do in nurture programs is to put the content-item-url in a program token. At some point in time our brand will update and a new version of the item becomes available. All I need to do is change the url in the program token and it would effect all assets within the program.
Anonymous
Not applicable

Re: Is it possible to create some redirect rules for pictures and pdfs?

0EM50000000QMv8.jpg
Cecile_Maindron
Level 10

Re: Is it possible to create some redirect rules for pictures and pdfs?

I like your idea of tokens. I need to check how easily we can implement that.

The issue that I mainly have is that we have created in past some ugly urls and we are updating content/visuals on a regular basis.I don't like the idea to upload an update version of a document under an existing ugly url. Not only this does not follow our convention naming but this can be misleading (old url name but new content). The easiest solution would be to replace url wherever it's posted but there is no way I can see where the asset url has been posted within Marketo and I sometimes no longer have control over what has been posted outside Marketo. So instead of deleting old url, I thought I could do a direct...
Anonymous
Not applicable

Re: Is it possible to create some redirect rules for pictures and pdfs?

Normally I would add all the old vs new urls in a .htaccess file to redirect them as a server admin, but that's not the case with Marketo pages of course. You can implement the tokens for the future, but that doesn't solve your current problem. Within Marketo you could create a .js file and load it via the template. You can poulate all redirects in that file. There is a catch. Javascript is a client-side code. A proper 301 or 302 redirect should be done serve-side.

$(document).ready(function () {

   if (window.location.pathname = "http://www.mywebstore.com/Page-we-want-to-skip-over.aspx") {
         window.location = 'http://www.mywebstore.com/Page-we-want-to-go-to-instead.aspx'
   }

});