Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
  #1  
Old 10-20-2006, 01:51 AM
Shazz's Avatar
Shazz Shazz is offline
 
Join Date: Jun 2006
Location: Utah
Posts: 4,758
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Error 404

Right now mine says

Code:
Error 404: NOT FOUND!
Your browser cannot find the document corresponding to the URL you typed in.
I want it to redirect to my home page everytime someone types something in wrong.

For example

http://www.vbulletin.org/zzzzzzzzzzZZZzzzzz

It forwards back to the home page...

Im gussing .htaccess?
Reply With Quote
  #2  
Old 10-20-2006, 01:56 AM
G0F0RBR0KE G0F0RBR0KE is offline
 
Join Date: Mar 2005
Posts: 987
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

yes, it must be done in the .htaccess
Reply With Quote
  #3  
Old 10-20-2006, 01:57 AM
Shazz's Avatar
Shazz Shazz is offline
 
Join Date: Jun 2006
Location: Utah
Posts: 4,758
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by EvilAkuma
yes, it must be done in the .htaccess
Errm, What would I put in -.-
Reply With Quote
  #4  
Old 10-20-2006, 02:05 AM
G0F0RBR0KE G0F0RBR0KE is offline
 
Join Date: Mar 2005
Posts: 987
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Check below for a better version

---------

Open Notepad and paste this

Code:
<HTML> 
<HEAD> 
<title> 404 Error Page</title> 
<META HTTP-EQUIV=REFRESH CONTENT="5;URL=http://www.yoursite.com">
</HEAD> 
<BODY> 
<p align="center"> 

<h1>Error 404</h1><br>Page Not Found 

<p>
<?php 

$ip = getenv ("REMOTE_ADDR"); 

$requri = getenv ("REQUEST_URI"); 
$servname = getenv ("SERVER_NAME"); 
$combine = $ip . " tried to load " . $servname . $requri ; 

$httpref = getenv ("HTTP_REFERER"); 
$httpagent = getenv ("HTTP_USER_AGENT");

$today = date("D M j Y g:i:s a T"); 

$note = "Wrong url loser!!!" ; 

$message = "$today \n 
<br> 
$combine <br> \n 
User Agent = $httpagent \n 
<h2> $note </h2>\n 
<br> $httpref "; 

$message2 = "$today \n 
$combine \n 
User Agent = $httpagent \n 
$note \n 
$httpref "; 

$to = "error@yoursite.com"; 
$subject = "yoursite Error Page"; 
$from = "From: fake@yoursite.com\r\n"; 

mail($to, $subject, $message2, $from); 

echo $message; 
?> 

</BODY></HTML>
Replace all yoursite with ur domain; if yours don't have a .com, change the .com to whatever ur URL ends with

Code:
$to = "error@mysticgaming.net"; 
$subject = "MysticGaming Error Page"; 
$from = "From: fake@mysticgaming.net\r\n";
^^^^^^^PREVIEW of MINE^^^^^^^^


save it as .php, make sure it don't end up as 404.php.html

If you don't have .htaccess, simply open notepad (new file) and type this in

ErrorDocument 404 /404.php

and save it as .htaccess; not .htaccess.txt

upload them in ur public_html folder and than test ur site with any URL that doesn't exist

Preview of my sites

http://mysticgaming.net/hotmail.com and http://areapx.org/yahoo.html
Reply With Quote
Reply

Thread Tools
Display Modes

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 07:33 AM.


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.06985 seconds
  • Memory Usage 2,183KB
  • Queries Executed 13 (?)
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)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (3)bbcode_code
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (4)post_thanks_box
  • (4)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (4)post_thanks_postbit_info
  • (4)postbit
  • (4)postbit_onlinestatus
  • (4)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_postinfo_query
  • fetch_postinfo
  • 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