I've tried a few different asset types and a few different url formats in the trigger - but I always get the same error message:
(/core/assets/system/triggers/trigger_action_types/trigger_action_add_url/trigger_action_add_url.inc:90) - Unable to add URL for a [asset_type_named here] asset
So I'm wondering if this trigger actually does something different? And if so what it actually does.
I think what you’re seeing with the Add URL trigger is due to the way URLs work in Matrix. In Matrix, you can only assign a URL to a Site asset, or to an asset which is a subtype of Site (e.g. the Design Folder asset type is a descendant of the Site asset type).
Other types of assets don’t control their own URLs - their URLs are derived from the site URL, plus all the webpaths of the assets between the site and the asset (the asset’s “lineage”), plus the asset’s own webpath, e.g.
So you can’t add a URL directly to a non-site asset, because the asset’s URLs are automatically generated based on where it’s linked in the asset tree.
I’m not sure I really understand what you mean when you say you “want to add a redirect to any type of asset” - are you trying to create a new redirect on a different URL, which redirects to the original asset?
This is something I've wanted to achieve in the past so when a similar question was asked a month or so ago it stuck in my mind - I'm afraid it might not be the answer you were hoping for though... http://forums.squizsuite.net/index.php?showtopic=13375
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.