![]() |
Redirect error pages to controller with error form to be filled by user - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21) +--- Thread: Redirect error pages to controller with error form to be filled by user (/showthread.php?tid=50938) |
Redirect error pages to controller with error form to be filled by user - El Forum - 04-14-2012 [eluser]bleu[/eluser] Can I redirect in my application/errors/error_404.php to my website controller like www.xyz.com/controller404 I want to write the below in my error files Code: header("Location: controller404"); Is this proper from a security point of view? I want this as I want an error form to be provided which can be filled by the user after which an email will be sent to me. I want different forms for 404,db,general and php errors Redirect error pages to controller with error form to be filled by user - El Forum - 04-14-2012 [eluser]CroNiX[/eluser] No, you never want to redirect on 404s. You want the current url that triggered the 404 to be the current url when sending the 404 header to the browser when throwing the 404 error. If you redirect, it won't be. "controller404" would always be the 404 error, which would be wrong. This is very important for a properly working site and search engines. Redirect error pages to controller with error form to be filled by user - El Forum - 04-15-2012 [eluser]bleu[/eluser] [quote author="CroNiX" date="1334433603"]No, you never want to redirect on 404s. You want the current url that triggered the 404 to be the current url when sending the 404 header to the browser when throwing the 404 error. If you redirect, it won't be. "controller404" would always be the 404 error, which would be wrong. This is very important for a properly working site and search engines.[/quote] Then Can I redesign the error pages which are available in errors folder? |