How to perform routes in Zend Framework 1.x and also redirect custom error messages?
How to perform routes in Zend Framework 1.x and also redirect custom error messages?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
To perform customized routes:
Put the following in your
bootstrap.phpfilethen, in your controller action, you will access it with a data variable which you have just set.
For example:
For Category – Post display
then in category controller and post action, I will use
$this->getRequest()->getParam('postId');which will frame url as : example.com/post/123
ZF1 comes you a predefined ErrorController, you can use it.
You can set HTTP_STATUS_CODES from the list but, make sure you give user’s browser and search bots the right statuses.