Blog URIs: many different ways to construct them. What did you do? |
[eluser]keld[/eluser]
yes I think it does, will try this tonight. Thanks a lot! Is you show_404() a custom function? What do you have in it, you load your template with an error message to have a 404 page using your site's design or just the default browser's 404
[eluser]JoostV[/eluser]
show_404() is a default CI function. http://ellislab.com/codeigniter/user-gui...rrors.html I adjust the 404 template to the look and feel of the site.
[eluser]keld[/eluser]
Hey so I'm almost there, one question though, when I get a 404 redirect using the show_404() function, I'd like instead to display my own custom 404 page (which will actually be my template file that i use for displaying my regular webpages plus some extra options like links plus a searh field. So I modified the error_404.php but then I got an error message on 'load' in Code: $this->load->view('navigation'); I have then created a 404.php view and in my controller did show_404('mc_home_controller/error_404'); because in the documentation is says you can pass the url of the page you to display but I still get the ugly 404 page. Any advices? Thanks!
[eluser]keld[/eluser]
I've found some info there http://ellislab.com/forums/viewthread/109430/, it doesn't seem like there's a real solution to it except having some static html in the default 404 page if you don't want to change the url
[eluser]JoostV[/eluser]
That's simple, really. Just don't use show_404(); Instead, send a raw 404 header in your controller before you load the views (make sure you have NO output before you send the header). Code: // Fetch post by id or throw 404
[eluser]n0xie[/eluser]
Why not just use: Code: example.com/blog/what-an-interesting-blog-post And use canonical to solve any bad linkage/duplicate content etc etc.
[eluser]keld[/eluser]
[quote author="JoostV" date="1263386070"] Code: // Fetch post by id or throw 404 I get a wrong header php error....
[eluser]JoostV[/eluser]
What's the error? [EDIT] Check to make sure you do not output anything to the browser before setting the header. |
Welcome Guest, Not a member yet? Register Sign In |