program redirect of links |
(10-01-2015, 11:06 PM)slax0r Wrote:(10-01-2015, 07:14 AM)mwhitney Wrote: You could also use a _remap() function in your controller to lookup the correct information and perform the redirect. I wouldn't put a _remap() function in the base controller. In fact, I think that would be a bad idea, because most of my controllers have no need for a _remap(). I would create a controller named Id with a _remap() function to point it wherever the calls need to go. If I needed to remap more URLs than just those with 'id' in the first segment, I would make more controllers. If this was a significant problem, I would create a library to rewrite the routes and override the router to load the library. However, that would be my last-ditch approach, as it indicates that all other attempts to fix the problem have failed. |
Messages In This Thread |
program redirect of links - by Andryshok - 09-30-2015, 11:25 PM
RE: program redirect of links - by InsiteFX - 10-01-2015, 03:48 AM
RE: program redirect of links - by Andryshok - 10-01-2015, 04:01 AM
RE: program redirect of links - by slax0r - 10-01-2015, 05:58 AM
RE: program redirect of links - by mwhitney - 10-01-2015, 07:14 AM
RE: program redirect of links - by slax0r - 10-01-2015, 11:06 PM
RE: program redirect of links - by mwhitney - 10-02-2015, 09:24 AM
|