change MEDIA LIBRARY URL to more shorten version

Andrew Ahn asked on July 7, 2017 20:45

Hi, When I upload PDF to a media library it generates perm link as below. https://www.johnsmith.com/getmedia/08edff02-62e3-41dd-p1b0-19ea7659638p/kingdom-667283-action-plan.aspx But is there any way to customize or control the URL generated by CMS? For example, I like to change above URL to https://www.johnsmith.com/support/pdf/kingdom-667283-action-plan

Recent Answers


Brenden Kehren answered on July 7, 2017 21:17

By default the friendly URL generated is generated like so:

/<sitecodename>/media/<librarycodename>/<folders-or-files> OR
/johnsmith/media/images/logo.png

If you do not use the permanent URL you will get something like above, otherwise the permanent URL is how it is unless you re-wrote a bunch of code.

You do have the ability to change the path that is setup in the settings which would modify the non-permanent URL although I'm not sure it will get much shorter than what I've shown above.

0 votesVote for this answer Mark as a Correct answer

Trevor Fayas answered on July 10, 2017 15:34

Along with what Brenden said, you can shorten 1 step further by setting a designated Media Library folder that is shared amongst the entire instance, so then it becomes /<mediafolder/<librarycodename>/<folders-or-files>, so it takes out the site name.

Settings > COntent > Media > Storage > Media Library Folders

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.