How to perform routes in Zend Framework 1.x and also redirect custom error messages?
相关问题
- Views base64 encoded blob in HTML with PHP
- Laravel Option Select - Default Issue
- PHP Recursively File Folder Scan Sorted by Modific
- Can php detect if javascript is on or not?
- Using similar_text and strpos together
To perform customized routes:
Put the following in your
bootstrap.php
filethen, 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.