Welcome Guest, Not a member yet? Register   Sign In
ajax redirect to exception/error pages
#6

Looking at the URLs you're setting for window.location I pretty sure you are getting redirecting to a 404 anyway.

CodeIgniter expects the URL segments after to represent controller/method/args and errors/html/error_404 does not fit that pattern.

So you will need to create a controller/method to handle the error condition (or conditions) that might be returned.

The methods should either load a view detailing the error or throw an exception - possibly both. From the controller/methods, you can

PHP Code:
echo view('errors/html/error_404'); 

or

PHP Code:
echo view('errors/html/production); 

Or any other view files in errors/html or any custom pages saved anywhere you care to create them.
Reply


Messages In This Thread
RE: ajax redirect to exception/error pages - by dave friend - 06-22-2020, 11:36 AM



Theme © iAndrew 2016 - Forum software by © MyBB