|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2005-11-08 05:02 UTC] betz@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 03:00:02 2025 UTC |
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?