URL redirect widget for two media files in same gallery

Former Member
Former Member

We have two files in the same media gallery. Each needs to be redirected to a different URL. In other words: File 1 needs to be redirected to File 3, and File 2 needs to be redirected to File 4.

I found this widget on marketplace and installed it. I then went to File 1 (Page Not Found - M-Files Community), and clicked "Manage Site Theme/Edit Page". I installed the widget, configured it to direct it to the new URL. Then I logged in as a non-admin user and tested it, and lo and behold, it worked! Yay!

But don't celebrate yet....

Because then I go to File 2 (https://community.m-files.com/events/m/event-videos/21), and repeat the same process. Problem is that the widget is already installed due to my steps above, so now File 2 also redirects to File 3. I need it to redirect to File 4.

What's the catch here? There must be a way to redirect two files in the same gallery to two different places. I'm missing something. What is it? Thanks!

Parents Reply Children
  • Ideally, this is a good match for the UrlRedirects API. It establishes redirects from one URL to another. This same API is used by the platform, itself, when moving existing content. But there is presently neither UI exposure of this API nor exposure to REST or scripting, so the only way to invoke it is through a plugin. I'm logging an item to review exposing this API to scripting and REST so it's consistent with other APIs. At least then, it could be just a scripting couple calls in Widget Studio to use. For now, it's still possible to use this via your own plugin. But if there's not many of them, it would probably be even easier to define redirects outside of Community like in the web server. 

    TE-16858