php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #35146 ErrorDocument 404
Submitted: 2005-11-08 02:41 UTC Modified: 2005-11-08 05:02 UTC
From: kingva at jy-trading dot com Assigned:
Status: Not a bug Package: Documentation problem
PHP Version: Irrelevant OS: FreeBSD
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: kingva at jy-trading dot com
New email:
PHP Version: OS:

 

 [2005-11-08 02:41 UTC] kingva at jy-trading dot com
Description:
------------
I made file .htaccess in the default directory,include following content:

ErrorDocument 404 /404.php

also I made a file:404.php,



Reproduce code:
---------------
404.php:
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1"> 
<title>title</title>
</head>
 <?php 
$url=getenv("REQUEST_URI");
$pos = strpos($url, '/');
$url = substr($url, $pos+1);
$suggestedurl=DoRedirect($url);
?>
<script language="JavaScript">
window.top.location="<?php print($suggestedurl);?>";
</script>

Expected result:
----------------
If the URL is not exist, We will get another url.





Actual result:
--------------
sometimes working well, sometimes not in the IE, But in the Firefox, it always working well. but on my local computer, it always working well.

the actual address: www.winmag.nl

you can test : www.winmag.nl/1265

you should get the article 1265, but sometimes not, maybe you get "The page cannot be found", if you refresh in the IE. Maybe you get the article.

I dont know what's the reason, Can you help me?

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-11-08 05:02 UTC] betz@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.

The bug system is not the place to answer user questions. Please use the appropriate
support options (mailinglists etc.)

Friedhelm
 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Fri Apr 10 19:01:24 2020 UTC