@Arnold :
It works for me. Sample non-existent page i visited :
Code:http://www.waltdisneyboards.com/blah-blah-blah.html
This is a discussion on Create a Custom vBulletin "404 Page Not Found" Page, and direct vBSEO to use it. within the Member Articles forums, part of the Focus on Members category; @Arnold : It works for me. Sample non-existent page i visited : Code: http://www.waltdisneyboards.com/blah-blah-blah.html...
@Arnold :
It works for me. Sample non-existent page i visited :
Code:http://www.waltdisneyboards.com/blah-blah-blah.html
Wow, I guess it was one of those 'cache' things, huh?
Thanks for your help Keith and thanks for 'showing me the light' Shadab!![]()
Wonderful article, but of course I've run into an issue ! :(
The 404 page itself then displays, but I really need to get rid of the errorsCode:Warning: Cannot modify header information - headers already sent by (output started at /home/www/www.webmastertalk.co.uk/web/404.php:1) in /home/www/www.webmastertalk.co.uk/web/404.php on line 2 Warning: Cannot modify header information - headers already sent by (output started at /home/www/www.webmastertalk.co.uk/web/404.php:1) in /home/www/www.webmastertalk.co.uk/web/404.php on line 3
It looks like you have extra line break at the top of 404.php file. Make sure that topmost line starts with "<?php".
Oleg Ignatiuk / Crawlability Inc.
vBSEO 3.6.0 GOLD Released!
Unveiling the NEW vBSEO Sitemap Generator 3.0. - available NOW for vBSEO Customers!
I don't know what I am doing wrong....
my page is up: http://gridironfans.com/forums/404.php
But if you go to the search link (which is incorrect) you go to the default webhost 404 page: http://gridironfans.com/search.php
When I go to this fake page I get the default 404: http://gridironfans.com/blah-blah-blah.hmtl
But when I go here: http://gridironfans.com/forums/blah-blah-blah.hmtl
I get this:PHP Code:Warning: include(/home/sblueman/public_html/forums/404.php ) [function.include]: failed to open stream: No such file or directory in /home/sblueman/public_html/forums/vbseo.php on line 1446
Warning: include() [function.include]: Failed opening '/home/sblueman/public_html/forums/404.php ' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/sblueman/public_html/forums/vbseo.php on line 1446
since you are in /forums, this 404 will only work in your forums directory, not root.
seeing the hostgator error is valid for a root-level error.
(and this is another reason why i always suggest installing vb/ vbseo in root)
as for your custom 404 in the forums directory, your path is wrong.
/home/sblueman/public_html/forums/404.php
doesn't exist. you can probably find your true path from the php info script in the vb acp.
Should I un-install and re-install vbSEO in the root directory then?
Also....I have the 404.php file in my forums directory....and when I go to PHP info in my vb ACP the document root is /home/sblueman/public_html .....now is that the correct value?
That won't do you any good... as your vb is not in root. vbseo needs to be where vb is.
you would need to move your entire forum down a directory, set up a custom forum homepage (ie, forums.php instead of index.php) so that vba will still work
as for your path, it might be something weird on your host. i'd suggest contact them for the true path, as what is shown obviously isn't working.
You could consider adding some code from Google that helps users who misspelled the url
Official Google Webmaster Central Blog: Make your 404 pages more useful
For those who had been looking for how to get 404.php working throughout their sites and have vb in forums/ directory
I just got it working !
1. As described in first post, create the template.
2. For 404.php, copy this code and upload/save in site root i.e. under "public_html"
We are using chdir() with an absolute path (this solves the problem that was faced with just chdir('forums'))Code:<?php header("HTTP/1.0 404 Not Found"); header("Status: 404 Not Found"); $_GET['do']='page'; $_REQUEST['do']='page'; $_GET['template']='404'; $_REQUEST['template']='404'; define('VBSEO_PREPROCESSED', 1); chdir('/usr/home/username/public_html/forums/'); include '/usr/home/username/public_html/forums/misc.php'; ?>
3. In the .htaccess of the site root i.e. .htaccess located under "public_html", put this in the end of file:-
4. Atlast, in vBSEO CP, "File Not Found" requests handling?, enter the absolute path to 404.phpCode:ErrorDocument 404 /404.php
Thats it, hope it helps !
Thank you! Worked like a charm.
allthingsmoto.com & bodynspirit.net vBSEO Optimized
Awesome...