Welcome Guest, Not a member yet? Register   Sign In
My 404 pages loading as google 404 pages

If I mess up my segment_1 portion of my URL, instead of going to my 404 page, it goes to google's 404 page. I've attached the page that loads.

So for example, if I type in http://www.mydomain.com/brokenlink/ it takes me to the screenshot i showed. But if I go to http://www.mydomain.com/reallink/brokenlink/ it takes me to my own 404 page.

I can't figure out why it is doing this. Any tips on how to stop this?

P.S. I have htaccess set so I'm not using index.php but I have the same problem if I'm using index.php.

That's wall Chrome displays, however Firefox shows
Fatal error: Call to undefined function get_instance() in /home/a2youth.com/public_html/a2_system/application/errors/error_404.php  on line 1

That's were your issue is.

Thanks so much! My firefox has google toolbar and I guess chrome does that by default. So since it had an error I guess it showed that page instead.

I fixed it to redirect to the homepage if get_instance() wasn't a function.

I have a followup question. I realize now that the reason it was working on the other links was because get_instance() function was initialized. How come it isn't when my segment_1 URI isn't correct? I thought it would still go through CI's main system and I could use get_instance().

Anyone know/can help me understand. Thanks!

The request is first sent to the [url="http://ellislab.com/codeigniter/user-guide/overview/appflow.html"]Router[/url]. The Router examines the url and the request and handles it accordingly. Since your 1st segment doesn't exist, the CI instance won't be available. You can see in the Codeigniter.php file the order in which items are initiated. The reason for this is with CI's page caching function, upon a page request, the router will check if a cached paged exists and serve the static html without even running CI.

Theme © iAndrew 2016 - Forum software by © MyBB