Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Details »»

Version: , by smokey smokey is offline
Developer Last Online: Jul 2018 Show Printable Version Email this Page

Version: Unknown Rating:
Released: 05-30-2001 Last Update: Never Installs: 0
 
No support by the author.

Have vbulletin handle your 404 errors instead of a seperate page. This hack is aimed at people who use vbulletin on a seperate subdomain or domain from there accual site. Example would be www.myforums.com or forums.mysite.com but im sure it would work if ut url is like www.mysite.com/forums

The zip file contains the following files:

notfound.php - Main file for the script
install_404.php - File to install the templates for this script
.htaccess - The file that calls up notfound.php for the 404 error instead of the server defualt
ToDo.txt - Just a small file with instructions on where to upload the files.

Please note that this may not work on all servers, if this does not work, contact your server admin and see what you can do, he/she may have to make the notfound.php the defualt 404 handler for your board.

Enjoy!

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 06-03-2001, 03:38 AM
JohnM's Avatar
JohnM JohnM is offline
 
Join Date: Oct 2001
Posts: 31
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

note that this will only work on apache servers

you might be able to get your webhost to set the php script to be the 404 error page on other servers.
Reply With Quote
  #3  
Old 06-03-2001, 03:54 AM
smokey's Avatar
smokey smokey is offline
 
Join Date: Nov 2001
Location: North Carolina
Posts: 32
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thanx for the tip john
Reply With Quote
  #4  
Old 06-03-2001, 04:02 PM
SNA
Guest
 
Posts: n/a
Default

Why does this work with the forums but not with other virtual hosts?


This works:
<VirtualHost xx.xx.xxx.xxx:80>
ServerName forums.mysite.com
DocumentRoot /pathtoforums/messageboard
ErrorDocument 404 /notfound.php
</VirtualHost>


Then i made a new notfound.php with jus TEST in it...

and put it in the root of the this virtualhost

<VirtualHost xx.xx.xxx.xxx:80>
ServerName www.mysite.com
DocumentRoot /pathtoforums/test
ErrorDocument 404 /notfound.php
</VirtualHost>

The only way to get it to work was to do this...

<VirtualHost xx.xx.xxx.xxx:80>
ServerName www.mysite.com
DocumentRoot /pathtoforums/test
ErrorDocument 404 http://www.mysite.com/notfound.php
</VirtualHost>


Now the $REQUEST_URI doesnt work... it just shows /notfound.php not the page I was orginally trying to access.... any ideas?


Thanks,
Reply With Quote
  #5  
Old 06-03-2001, 08:38 PM
smokey's Avatar
smokey smokey is offline
 
Join Date: Nov 2001
Location: North Carolina
Posts: 32
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well the REQUEST_URI dont work because u put the full url in it. When it is /notfound.php then it uses the file that was requested. Now adding the error document to the dns, if the only way it works is by entering the full url to the notfound.php, then hyst edit the file_not_foundbit template and remove that part, i hope that helps. Also did u try using the .htaccess?
Reply With Quote
  #6  
Old 06-03-2001, 08:56 PM
SNA
Guest
 
Posts: n/a
Default

Smokey maybe you missunderstood me.. Your hack works great!

I was just trying to add a /notfound.php to my other virtual hosts and its not recognizing it.. i think its somehting with the Cache.. cause when I use lynx to bring up the page it does redirect properly... nice hack ....
Reply With Quote
  #7  
Old 06-03-2001, 09:00 PM
smokey's Avatar
smokey smokey is offline
 
Join Date: Nov 2001
Location: North Carolina
Posts: 32
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

lol, yeah i am like half asleep... thanx
Reply With Quote
Reply


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

Forum Jump


All times are GMT. The time now is 02:36 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.11505 seconds
  • Memory Usage 2,251KB
  • Queries Executed 20 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (7)post_thanks_box
  • (7)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (7)post_thanks_postbit_info
  • (6)postbit
  • (5)postbit_onlinestatus
  • (7)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete