pasti lu pernah kan kalao web yang lu buat dari 000webhost mengalamai Error 404 karena salah url atau salah ketik
dan web lu mendirect ke http://error404.000webhost.com/?
cara nya seperti ini :
1.Pertama adalah tambahkan atau edit file .htacces pada /public_html hosting kamu . Isikan file tersebut dengan kode berikut ini :
ErrorDocument 403 /error.php
ErrorDocument 404 /error.php
ErrorDocument 500 /error.php
2.Kemudian tambahkan juga file error.php pada /public_html hosting kamu. Isikan file tersebut dengan kode berikut ini
<?php
$status = $_SERVER['REDIRECT_STATUS'];
$codes = array(
403 => array('403 Forbidden', 'The server has refused to fulfill your request.'),
404 => array('404 Not Found', 'The document or file requested was not found.'),
405 => array('405 Method Not Allowed', 'The method specified in the Request-Line is not allowed for the specified resource.'),
408 => array('408 Request Timeout', 'Your browser failed to send a request in the time allowed by the server.'),
500 => array('500 Internal Server Error', 'The request was unsuccessful due to an unexpected condition encountered by the server.'),
502 => array('502 Bad Gateway', 'The server received an invalid response from the upstream server while trying to fulfill the request.'),
504 => array('504 Gateway Timeout', 'The upstream server failed to send a request in the time allowed by the server.')
);
$title = $codes[$status][0];
$message = $codes[$status][1];
if ($title == false || strlen($status) != 3) {
$message = 'Please supply a valid status code.';
}
echo '<p><h1>' . $title . '</h1></p>' .
'<p>' . $message . '</p>';
?>
tapi bisa juga error.php nya kita ganti dengan script kita sendiri...
<?php
$status = $_SERVER['REDIRECT_STATUS'];
$codes = array(
403 => array('403 Forbidden', 'The server has refused to fulfill your request.'),
404 => array('404 Not Found', 'The document or file requested was not found.'),
405 => array('405 Method Not Allowed', 'The method specified in the Request-Line is not allowed for the specified resource.'),
408 => array('408 Request Timeout', 'Your browser failed to send a request in the time allowed by the server.'),
500 => array('500 Internal Server Error', 'The request was unsuccessful due to an unexpected condition encountered by the server.'),
502 => array('502 Bad Gateway', 'The server received an invalid response from the upstream server while trying to fulfill the request.'),
504 => array('504 Gateway Timeout', 'The upstream server failed to send a request in the time allowed by the server.')
);
$title = $codes[$status][0];
$message = $codes[$status][1];
if ($title == false || strlen($status) != 3) {
$message = 'Please supply a valid status code.';
}
echo '<p><h1>' . $title . '</h1></p>' .
'<p>' . $message . '</p>';
?>
ya tergantung kreativitas
Minggu, 20 November 2011
//
Label:
webhosting
//
0
komentar
//
0 komentar to "Setting 404 Error Page di 000webhost"
Laman
x0wn3d
nanda. Diberdayakan oleh Blogger.
About This Blog
My Blogs
Blog Archive
-
▼
2011
(27)
-
▼
November
(24)
- Data Kariawan ( Pascal )
- Bug di hosting 000webhost
- Templete Portal Blog
- x0wn3d Credit Card Cheker
- Script scan site 1 server
- Script upload
- Mini File Host v1.5 Remote File Upload Vulnerability
- game shaun the sheeps online
- ubah nama kamu menjadi muka
- vBulletin 4.0.x => 4.1.2 (search.php) SQL Injectio...
- Perbedaan VB 6 dan VB .Net
- FTP & Mysql Brutaforce ( PHP )
- wordpress brutaforce (PHP)
- cara menginstal backtrack 5 extensi vmdk pakai vmware
- cara memanggil file .exe pakai visual basic
- membuat form berpassword menggunakan visual basic
- menghitung luas lingkaran,persegi,etc pakai pascal
- bot update status fb pakai perl
- PHP Login script
- 7,000 Dorks
- Setting 404 Error Page di 000webhost
- Serial Key smadav 8.7
- Joomla! Security Scanner
- Script Mini host file
-
▼
November
(24)
Followers

Posting Komentar