mymotherland
mymotherland

Reputation: 8226

how do i redirect to index page when user enters unwanted action at end of url using zend?

I am new to zend, I have an action, like http://test.zend.com/auth/index which means auth is controller and index is an Action.Now If user enter like test.zend.com/auth/indexxxx ,will get redirect to ErrorController page.I dont want to display Error Controller page here, instead I always want to redirect to index page when user enters unwanted action.

Kindly help.

Upvotes: 1

Views: 639

Answers (1)

rahim asgari
rahim asgari

Reputation: 12437

In your error controller redirect to index:

$this->_redirect('/index');

Upvotes: 1

Related Questions