We build. You grow.

Get best community software here

Start a social network, a fan-site, an education project with oxwall - free opensource community software

Plugin redirect URL? | Forum

Topic location: Forum home » Support » General Questions
Marcus
Marcus Mar 21 '17
My plugin has many controllers each is like a sub-directory!

site.com/1
site.com/2
site.com/3
site.com/4

and so on....

Now all this is one plugin!

My question is how can I check each URL and if it matches regex 301 redirect it to another url!

Can that be done with unit.php ?

I am a newbie please give an some pointers which file do I need to trick!


I have created class event_handler BUT why: $event->getParams() doesn't return any value it's empty?????





public function init()
    {
        OW::getEventManager()->bind(OW_EventManager::ON_AFTER_ROUTE, array($this, "onAfterRout"));
    }

   
    public function onAfterRout(OW_Event $event)
    {
       

        print_r( $event->getParams());

}


This works:

public function index($params)

why not the above????
The Forum post is edited by Marcus Mar 21 '17
Scam Detector
Scam Detector Apr 4 '17
Why do you need that "subdirs" for each controller? Why do you need redirections?

What exactly do you want to do? Maybe I can help

The Forum post is edited by Scam Detector Apr 4 '17