ID: 23901 Updated by: [EMAIL PROTECTED] Reported By: tdrake at tymail dot com -Status: Open +Status: Bogus Bug Type: Apache2 related Operating System: Redhat Linux 9 PHP Version: 4.3.2 New Comment:
This has absolutely nothing to do with PHP. Previous Comments: ------------------------------------------------------------------------ [2003-05-30 10:56:10] ted at suteki dot org You can find a working example of this at: http://www.suteki.org ------------------------------------------------------------------------ [2003-05-30 10:38:49] tdrake at tymail dot com I'm not really sure if this is a problem with php or with apache2, but here goes. I use a technique called "Clean URLs" to make better use of get variables. The idea behind it is to allow both simplification and obfusication of URLs when working with GET variables. An example of a "Clean URL" would be: http://servername/index.php/foo/bar Instead of: http://servername/index.php?var1=foo&var2=bar This technique has worked fine for me in the past, but has since stopped working after upgrading to Apache 2 and PHP 4.3.2. I now get an apache 404 error when the extra /'s are added to the url line. The following script works when using apache 1.x but not 2.x. <? $url = explode("/", $PHP_SELF); $getvars=array(); while (list($key, $value) = each($url)) { if (ereg("=", $value)) { list($var_name, $val) = explode("=",$value); $getvars[$var_name] = urldecode($val); } else { $getvars[$var_name] = $urldecode[$value]; } } $sysvars->HTTP_POST_VARS = $HTTP_POST_VARS; $sysvars->HTTP_GET_VARS = $getvars+$HTTP_GET_VARS; $sysvars->HTTP_COOKIE_VARS = $HTTP_COOKIE_VARS; // This should print the variables that were encoded in the URL. print_r($sysvars->HTTP_GET_VARS); ?> ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=23901&edit=1