This application should work two ways:
- if URL is in the form: appurl.com/code, the RedirectController should be called, which will handle redirection, and code should be checked aganist db and proper destination URL should be taken from there,
- if URL is a normal YII URL, containing valid route, proper controller and action should be called with all key-pairs passed in URL.
If there aren't any ready to use out-of-the-box extensions or solutions, I think I can handle while application myself. But the URL management is the biggest pain (as always) for me.
For particular, I'm thinking if this will be better to solve upon urlManager, crafting some magic rule (don't know which) so it will call either RedirectController when required or any other in any other case.
Or, if this would be better to solve basing on CWebApplication::catchAllRequest to route everything to one controller and write most of application code in that controller. It would then check URL string manually and decide whether redirection should take place or some in-app management will be executed.
Thank you in advance for any tips here.