What exactly are you trying to accomplish?  Redirecting to the refering URL?  If so, you might want to try this:
<?php
$url="">
echo '<a href="" . $url . '">Back to previous page...</a>';


 
On 11/7/05, kingva at jy-trading dot com <phpdoc@lists.php.net> wrote:
From:             kingva at jy-trading dot com
Operating system: FreeBSD
PHP version:      Irrelevant
PHP Bug Type:     Documentation problem
Bug description:  ErrorDocument 404

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="">$pos = strpos($url, '/');
$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?

--
Edit bug report at http://bugs.php.net/?id=35146&edit=1
--
Try a CVS snapshot (php4):   http://bugs.php.net/fix.php?id=35146&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=35146&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=35146&r=trysnapshot51
Fixed in CVS:                http://bugs.php.net/fix.php?id=35146&r=fixedcvs
Fixed in release:             http://bugs.php.net/fix.php?id=35146&r=alreadyfixed
Need backtrace:              http://bugs.php.net/fix.php?id=35146&r=needtrace
Need Reproduce Script:       http://bugs.php.net/fix.php?id=35146&r=needscript
Try newer version:           http://bugs.php.net/fix.php?id=35146&r=oldversion
Not developer issue:         http://bugs.php.net/fix.php?id=35146&r=support
Expected behavior:           http://bugs.php.net/fix.php?id=35146&r=notwrong
Not enough info:             http://bugs.php.net/fix.php?id=35146&r=notenoughinfo
Submitted twice:             http://bugs.php.net/fix.php?id=35146&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=35146&r=globals
PHP 3 support discontinued:  http://bugs.php.net/fix.php?id=35146&r=php3
Daylight Savings:             http://bugs.php.net/fix.php?id=35146&r=dst
IIS Stability:               http://bugs.php.net/fix.php?id=35146&r=isapi
Install GNU Sed:             http://bugs.php.net/fix.php?id=35146&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=35146&r=float
No Zend Extensions:          http://bugs.php.net/fix.php?id=35146&r=nozend
MySQL Configuration Error:   http://bugs.php.net/fix.php?id=35146&r=mysqlcfg

Reply via email to