Register Members List Search Today's Posts Mark Forums Read

Reply
 
Mod Options
Create 404 Page Details »
Create 404 Page
Mod Version: 1.00, by ALBCODERS (Member) ALBCODERS is offline
Developer Last Online: Dec 2014 I like it Show Printable Version Email this Page

vB Version: 4.0.x Rating: (3 votes - 3.67 average) Installs: 44
Released: 29 Jun 2010 Last Update: 29 Dec 2010 Downloads: 200
Not Supported Template Edits  

I am not a proffessional Coder but I just fixed a 404 page for my Forum.
If you want to create one follow me;

Crate a new template wich will called 404_error on your style:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Change the text (( PUT YOUR CODE OR IMAGE HERE )) whith your Code that you want.

So Now you need a 404.php lets create one;


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Now open .htaccess file and add this ;

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Download Now

Only licensed members can download files, Click Here for more information.

Show Your Support

  • To receive notifications regarding updates -> Click to Mark as Installed.
  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Comments
  #2  
Old 01 Jul 2010, 18:42
wolfe wolfe is offline
 
Join Date: Jan 2002
nice also used this to do a 500 error page
__________________
Thanks
Reply With Quote
  #3  
Old 25 Jul 2010, 02:58
apokphp apokphp is offline
 
Join Date: Nov 2002
Can't get this to work (I'm using 4.0.5). This is the error message I get:

Warning: require_once(./global.php) [function.require-once]: failed to open stream: No such file or directory in /home/apokodn/public_html/404.php on line 32

Fatal error: require_once() [function.require]: Failed opening required './global.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/apokodn/public_html/404.php on line 32
This is apparently the code in question:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


I can change my .htaccess and use your link (to your 404.php) and it works fine. But with my own link to my own 404.php file, I get errors.

This is my .htaccess file:

<Files 403.shtml>
order allow,deny
allow from all
</Files>

deny from 128.241.46.107
deny from 199.67.140.154
deny from 199.67.140.83
deny from 209.136.124.178
deny from 24.255.4.133
deny from 65.73.24.110
deny from 68.0.166.100
deny from 68.105.138.218
deny from 68.111.15.15
deny from 68.226.22.66
deny from 68.231.184.133
deny from 68.231.185.12
deny from 68.231.185.219
deny from 68.231.189.51
deny from 69.9.30.7
deny from 72.211.152.125
deny from 72.211.156.96
deny from 72.211.157.157

RewriteEngine On
ErrorDocument 404 http://www.onlinedebate.net/404.php

ErrorDocument 403 /403.shtml

ErrorDocument 500 /500.shtml

RewriteCond %{HTTP_REFERER} !^http://onlinedebate.net/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://onlinedebate.net$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.onlinedebate.net/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.onlinedebate.net$ [NC]
RewriteRule .*\.()$ - [F,NC]
Reply With Quote
  #4  
Old 25 Jul 2010, 12:52
ALBCODERS ALBCODERS is offline
 
Join Date: Apr 2009
Try this :


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

I dont have 4.0.5 my last version is 4.0.3

Last edited by ALBCODERS; 29 Dec 2010 at 13:00.
Reply With Quote
  #5  
Old 25 Jul 2010, 19:39
apokphp apokphp is offline
 
Join Date: Nov 2002
This is the error I get now:

Warning: require_once(./global.php) [function.require-once]: failed to open stream: No such file or directory in /home/apokodn/public_html/404.php on line 11

Fatal error: require_once() [function.require]: Failed opening required './global.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/apokodn/public_html/404.php on line 11
Reply With Quote
  #6  
Old 25 Jul 2010, 19:44
apokphp apokphp is offline
 
Join Date: Nov 2002
I suspect the issue is w/ the global. I recall reading in another thread that 4.0.5 does something differently in its global calls.
Reply With Quote
  #7  
Old 28 Jun 2011, 07:47
River J River J is offline
 
Join Date: Jun 2011
there's easier ways to do this
Reply With Quote
  #8  
Old 06 Feb 2014, 17:55
GamerUnguided GamerUnguided is offline
 
Join Date: Dec 2012
i did this but the only problem is it logs the user out :/
Reply With Quote
  #9  
Old 16 Feb 2014, 01:44
SPEEDKILLZ SPEEDKILLZ is offline
 
Join Date: Feb 2011
Real name: Chris
What Would This Be Used for?
__________________
Reply With Quote
  #10  
Old 16 Feb 2014, 09:56
ozzy47's Avatar
ozzy47 ozzy47 is offline
 
Join Date: Jul 2009
Real name: Chris
What’s the use?
On a 404 page usually you want to let people know something went wrong and the page they wanted to see is not available.
But after you let him know what just happened, an advantage the 404 page offers is that you are able to suggest other pages he might want to see or give him instructions to get to an active page. Using a customized 404 page, visitors won’t get confused and leave the website not knowing what happened. If you decide not to have a customized 404 page you should know that a non-customized 404 page can look not so friendly.

Customized 404 Pages and Search Engines
Search engines also can benefit from a 404 page. Imagine that a link is broken and it leads to a non-existent page. At this point search engines can’t go any further and won’t index content. If you choose to have a customized 404 page even though a page is broken search engines will see a page that can be indexed and can find links to pages that could benefit from a crawling. This is an SEO benefit!

404 Pages bring credibility
Having a non-customized 404 page looks unfriendly. But imagine a scenario where a visitor ends up on the 404 page and is shown a nice image, some instructions and links to other pages he might be interested in. He will thing that you really care about his experience on your website and probably he will go to a page you suggested and won’t leave your website or hit the back button
__________________
You can get access to my 180 mods for vB 3.6 - 4.x at The Admin Zone as well as the professional support you are used to. New vBulletin Spider Definitions, vBulletin Spiders List Hits 1000 Spiders! ​ OzzModz down. Site has had a data breach, checking how the intrusion happened. Change your PW if you use the same one on my site and others.
Reply With Quote
  #11  
Old 24 Feb 2014, 18:08
RichieBoy67's Avatar
RichieBoy67 RichieBoy67 is offline
 
Join Date: Apr 2004
Real name: Richie
Originally Posted by ozzy47 View Post
Whatís the use?
On a 404 page usually you want to let people know something went wrong and the page they wanted to see is not available.
But after you let him know what just happened, an advantage the 404 page offers is that you are able to suggest other pages he might want to see or give him instructions to get to an active page. Using a customized 404 page, visitors wonít get confused and leave the website not knowing what happened. If you decide not to have a customized 404 page you should know that a non-customized 404 page can look not so friendly.

Customized 404 Pages and Search Engines
Search engines also can benefit from a 404 page. Imagine that a link is broken and it leads to a non-existent page. At this point search engines canít go any further and wonít index content. If you choose to have a customized 404 page even though a page is broken search engines will see a page that can be indexed and can find links to pages that could benefit from a crawling. This is an SEO benefit!

404 Pages bring credibility
Having a non-customized 404 page looks unfriendly. But imagine a scenario where a visitor ends up on the 404 page and is shown a nice image, some instructions and links to other pages he might be interested in. He will thing that you really care about his experience on your website and probably he will go to a page you suggested and wonít leave your website or hit the back button
This is what I am using for now and this is very easy, no mod needed. I have had Bf easy pages installed for years for my Privacy statement and TOS so I just used it for a simple html error page and added it into my htaccess. I am using just one error page right now for all the errors but I will make more pages when i have time.

You guys are so right about the importance of this. I had created a bunch of error pages years ago and ended up losing them after theme and script upgrades. i have been doing without them until a couple days ago. It was pretty stupid of me to not have those when I had so many broken urls, etc from Vbseo removal.


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

__________________

Let us take care of your forum, seo, seo reports, maintenance, what ever you need.

Reply With Quote
  #12  
Old 30 Apr 2014, 15:30
Spangle Spangle is offline
 
Join Date: Jun 2011
Works on 4.2.2 PL1, if you use the second php code
Reply With Quote
  #13  
Old 30 Apr 2014, 15:58
DreadsUK's Avatar
DreadsUK DreadsUK is offline
 
Join Date: Jan 2014
Originally Posted by Spangle View Post
Works on 4.2.2 PL1, if you use the second php code
Which one? its confusing.
__________________
working for a more secure, more sustainable future www.dreadsuk.com
Reply With Quote
  #14  
Old 30 Apr 2014, 16:40
ForceHSS's Avatar
ForceHSS ForceHSS is offline
 
Join Date: Apr 2008
Originally Posted by apokphp View Post
This is the error I get now:
If you are getting this error it means you have not uploaded the file to the correct place it should go into your root or edited the php file correctly
Warning: require_once(./global.php) [function.require-once]: failed to open stream: No such file or directory in /home/apokodn/public_html/404.php on line 11

Fatal error: require_once() [function.require]: Failed opening required './global.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/apokodn/public_html/404.php on line 11

Last edited by ForceHSS; 30 Apr 2014 at 17:01.
Reply With Quote
  #15  
Old 30 Apr 2014, 16:47
Spangle Spangle is offline
 
Join Date: Jun 2011
Originally Posted by DreadsUK View Post
Which one? its confusing.

This one:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Mod Options

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 01:03.

Layout Options | Width: Wide Color: