Welcome Guest, Not a member yet? Register   Sign In
Redirect error pages to controller with error form to be filled by user
#1

[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
#2

[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.
#3

[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?




Theme © iAndrew 2016 - Forum software by © MyBB