404 error
Moderator: General Moderators
Re: 404 error
Looks right. Do you have a file "404.php" in your server root directory?
Re: 404 error
I solve the problem by using .htaccess
but my new problem is I need to know what is the require URL
but my new problem is I need to know what is the require URL
Re: 404 error
$_SERVER['REQUEST_URI'] ?
Re: 404 error
it gives me 404.php url but I need the wrong target one,that is my 404.php codeDarhazer wrote:$_SERVER['REQUEST_URI'] ?
Code: Select all
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title>404: Page Not Found</title>
<meta http-equiv="Content-type" content="text/html; charset=ISO-8859-1" />
</head>
<body>
<h1>404: Page Not Found</h1>
<?php
echo "the target url is";
$requri = $_SERVER['REQUEST_URI'] ;
echo $requri;
?>
</body>
</html>
-
spider.nick
- Forum Commoner
- Posts: 72
- Joined: Wed Jul 15, 2009 12:22 pm
- Location: Overland Park, KS
Re: 404 error
Code: Select all
$_SERVER['HTTP_REFERER']Re: 404 error
it gives this errorspider.nick wrote:NickCode: Select all
$_SERVER['HTTP_REFERER']
Undefined index: HTTP_REFERER in C:\wamp\www\404.php on line 12
-
spider.nick
- Forum Commoner
- Posts: 72
- Joined: Wed Jul 15, 2009 12:22 pm
- Location: Overland Park, KS
Re: 404 error
My bad. I misunderstood the question. The following might work:
Nick
Code: Select all
echo $_SERVER['PHP_SELF'];Re: 404 error
it give the url of 404.phpspider.nick wrote:My bad. I misunderstood the question. The following might work:NickCode: Select all
echo $_SERVER['PHP_SELF'];
-
spider.nick
- Forum Commoner
- Posts: 72
- Joined: Wed Jul 15, 2009 12:22 pm
- Location: Overland Park, KS
Re: 404 error
Hmm, perhaps I do not know? Sorry!
Nick
Nick