set_status_header('404'); |
[eluser]ci_user[/eluser]
On IIS 7, unable to output anything or load a view after setting a 404 header. Code: function custom_404 () { The header is set to 404 but all I get is a blank page. This issue has been discussed without resolution here: http://ellislab.com/forums/viewthread/218935/#1009898
[eluser]Ochetski[/eluser]
Tested $this->output>set_output($this->load->view('my_error', true)); yet?
[eluser]ci_user[/eluser]
[quote author="Ochetski" date="1339436994"]Tested $this->output>set_output($this->load->view('my_error', true)); yet?[/quote] Do you mean like: Code: $this->output->set_status_header('404'); That generates a server 500 error.
[eluser]CroNiX[/eluser]
2nd parameter to load:view() is supposed to be an array, not a boolean
[eluser]ci_user[/eluser]
Update: Appears to be an IIS issue (surprise). IIS apparently won't do a second http request after a 404 status is set. Instead, it will look for the file specified in IIS as the custom error page. Read about it in this thread: http://ellislab.com/forums/viewthread/204507/#954058 |
Welcome Guest, Not a member yet? Register Sign In |