Short URLs


(Jesstp) #1

Hi,

 

When a page or news item is created I would like to create a short link to go along with it.

 

Rather than: www.site.com.au/news/example/campaign

 

I would like: www.site.com.au/campaign

 

In the past redirects where created directly under the site (not in a folder), but this can start to get messy and really long.

 

How do I set up a folder with the redirects under it that doesn't include the folder name in the url?

 


(Tim Davison) #2

Do you want the redirects created automatically?  

 

If not then I'd suggest using the remap manager.  It allows redirects exactly like you're doing but it doesn't clog up the asset tree with assets.  You can also export and import from CSV.  

 

Not sure, maybe remaps can be created via a trigger?


(Jesstp) #3

Thanks again Tim. That is what I'm after!


(Bart Banda) #4

Yea I would go with remaps as well. But don't think it's possible to create custom ones like that automatically, the trigger action and js api methods only allow you to create them off the current path the asset already has, so www.site.com/path/path1 to www.site.com/path/path2

 

Would be nice to add that as a new feature though actually. 


(Kequi) #5

Been thinking about this off and on as I want to give edit + users the ability to create short urls (and you can't at the moment)

 

If you have full access to Matrix the best option as outlined above is the remap manager or the webpaths screen of the asset.

 

If you wanted to automate it though you can use 'redirect page' assets - and manipulate their location in Matrix to generate short urls.

 

You could create a redirect asset under the site root so it gets a nice url EG: www.mysite.com/nice_webpath

Then run a trigger to new link it it into a folder elsewhere in the site and delete all other links - EG:  /admin/remaps

 

Matrix would then auto add a remap from the nice url to the new url

 

so www.mysite.com/nice_webpath would remap to www.mysite.com/admin/remaps/nice_webpath and then to the asset specified in the "redirect" asset.

 

Of course it would be much cleaner if there were a trigger action - or something in the APIs.


(Bart Banda) #6

I think what we really need is to allow users in Edit+ to create any remap URL like you can on the web path screen of an asset in the Admin interface. Currently you can only create it off the current path. We could have it configurable as well so that you can disable it if you don't want your editors to have that power.