1 agnese Oct 16, 2009 09:29
3 agnese Oct 17, 2009 10:30
I have a multiblog site, and I have already set up custom 404 pages for each blog. They work properly
I would like to know how I can use/call the function _404_blog_not_found.main.php (in the folder "skin") and what url it generates.
In fact, I must indicate the url of my (general) error pages in the .htaccess file
Thank you very much
PS I posted this message yesterday, but something went wrong!
4 edb Oct 17, 2009 22:43
Still not sure what you're trying to do here. If you already have a customized 404 for each blog then when do you want the new customized 404 to show up?
By the way that is a file - not a function. It gets used when /inc/_blog_main.inc.php doesn't have a value for $Blog identified. So the core has been initiated, but it can't resolve the URL to a specific blog.
$Blog = & $BlogCache->get_by_ID( $blog, false );
if( empty( $Blog ) )
{
require $skins_path.'_404_blog_not_found.main.php'; // error & exit
// EXIT.
}
Actually, how you got one for each blog would be neat to know given that it only shows up when the core doesn't know what blog you're on! Oh wait I think I get it. A customized /skins/_404_not_found.main.php would work for a post or page in a blog, but that is different from /skins/_404_blog_not_found.main.php.
So I guess the question remains under what circumstances would you want _404_blog_not_found.main.php to show up?
5 edb Oct 17, 2009 22:45
By the way my bad. The first link to my domain above gives you the post-not-found version of 404. http://wonderwinds.com/index.php?blog=99 asks for a blog that doesn't exist, so it gives you _404_blog_not_found.main.php - sorry 'bout that.
6 agnese Oct 17, 2009 23:49
I would like to customize the server 404 page, whenever it happens to appear ... i.e. when one blog name is misspelled, or the blog doesn't exist.
In situations such as with the address: http://www.territorisociologici.it/blogs/trythis (when the server 404 page appears)
But, I suppose, I'd better create static html error pages ...
thank you very much
7 edb Oct 18, 2009 00:16
Ah okay - yeah that'd be outside b2evolution. You technically could tell b2evo's 404 to fire up the bits of the core it needs, but much easier to just make a generic 404 page. For me it is saved in the root directory level as 404.shtml - dunno why it is that extension but I copied it from one host to the next and it kept working. Working when something else doesn't work is what I mean :)
8 agnese Oct 18, 2009 00:19
EdB wrote:
Ah okay - yeah that'd be outside b2evolution. You technically could tell b2evo's 404 to fire up the bits of the core it needs, but much easier to just make a generic 404 page. For me it is saved in the root directory level as 404.shtml - dunno why it is that extension but I copied it from one host to the next and it kept working. Working when something else doesn't work is what I mean :)
yes, I tend to be pragmatic too! :-)
thank you very much
Hi Agnese. Not sure what you're trying to do, but to customize the one that b2evo provides from time to time all you have to do is edit the one it has. The path and filename you provided is pretty much just a little bit of php before and after the contents of a 404 page is the thing.
If you want a custom 404 for times when b2evo doesn't serve one up that'll go ... heck I dunno how that happens but mine works for all non-existent pages that b2evo doesn't even try to figure out. So http://wonderwinds.com/hackblog.php/2009/10/10/asdfadsfasdfasdf is the b2evo version (not customized) and http://wonderwinds.com/adsfasdfasdfadsf is the regular plain old 404 page.