开发者

how can I catch 'resource not found' exception and redirect url instead of showing an error?

开发者 https://www.devze.com 2023-03-05 20:06 出处:网络
I have a website that is served on Apache 2.2 and Zend Framework 1.11.5 with php 5.3. whenever a user tries to enter a page that doesn\'t exists he gets an exception \"resource not found\". how can i

I have a website that is served on Apache 2.2 and Zend Framework 1.11.5 with php 5.3.

whenever a user tries to enter a page that doesn't exists he gets an exception "resource not found". how can i catch that exception and redirect the user to a different domain on the same path instead of showin开发者_StackOverflow中文版g an error ?


You could modify your ErrorController::errorAction() to detect/redirect on those not-found exceptions.

0

精彩评论

暂无评论...
验证码 换一张
取 消