404_error.php breaks on php code (in specific cases) |
[eluser]jant90[/eluser]
When I try to a non-existing page CodeIgniter opens 404_error.php for me (which I styled to my liking), and where I added some PHP code. This is great except that it doesn't work fully as expected. When I load www.mydomain.nl/existingcontroller/nonexistingfunction for example the error document loads as expected but when I load www.mydomain.nl/nonexistingcontroller the 404 page breaks on the first PHP code. In my case this PHP code is in the head of the document at the following line: Code: <link rel="stylesheet" href="<?=base_url();?>includes/style.css" type="text/css" /> So all I get to see is an empty page, because after '<link rel="stylesheet" href="' nothing is loaded. IE shows an http 500 error. When I add Code: ErrorDocument 500 /index.php I think this problem might have something to do with my htaccess file as I remove www and index.php from my urls. My htaccess page looks like this, I got this htaccess from this forum and made a few changes: Code: Options -Indexes How do I get the full 404_error.php (including the dynamic php code) to load even when I call for a non existing controller? Thanks in advance, Jan |
Welcome Guest, Not a member yet? Register Sign In |