cvs: docweb /www redirect.php

[email protected] ("Nuno Lopes")
Newsgroups php.doc.web
Message-ID <cvsnlopess1113588463@cvsserver>
nlopess		Fri Apr 15 14:07:43 2005 EDT

  Modified files:              
    /docweb/www	redirect.php 
  Log:
  fix bug when the url doesnt have a trailling /
  
http://cvs.php.net/diff.php/docweb/www/redirect.php?r1=1.3&r2=1.4&ty=u
Index: docweb/www/redirect.php
diff -u docweb/www/redirect.php:1.3 docweb/www/redirect.php:1.4
--- docweb/www/redirect.php:1.3	Thu Feb 17 08:23:57 2005
+++ docweb/www/redirect.php	Fri Apr 15 14:07:42 2005
@@ -15,7 +15,7 @@
 +----------------------------------------------------------------------+
 | Authors:          Sean Coates <[email protected]>                         |
 +----------------------------------------------------------------------+
-$Id: redirect.php,v 1.3 2005/02/17 13:23:57 nlopess Exp $
+$Id: redirect.php,v 1.4 2005/04/15 18:07:42 nlopess Exp $
 */
 
 require_once('../include/lib_proj_lang.inc.php');
@@ -41,6 +41,10 @@
     }
 
     $filename = "./$filename";
+
+    if (is_dir($filename))
+        return "$filename/index.php";
+
     return $filename;
 }
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.