Redirect Problem

From: Date: Fri, 18 Aug 2000 04:58:27 +0000
Subject: Redirect Problem
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-12403@lists.php.net to get a copy of this message
Hi All, I have a small redirect problem. I'm currently using a Javascript to redirect a page through a CGI if someone comes directly to that page. I'm finding a lot of people seem to have JS turned off, or are using older browsers that don't support the way I'm doing it. Apart from that, it works great. if( window.location.href == 'http://www.server.com<?php echo $PHP_SELF; ?>') { window.location.href = 'http://www.server.com/cgi-bin/SoftCart.exe<?php echo $PHP_SELF; ?>?E+toolstore'; } I'm trying to adapt this to just using PHP but can't quite work it out. Part of the problem is SoftCart, as it sends the page to PHP without a query string, and then parses it itself with a query string. Meaning that when I go to: www.server.com/cgi-bin/SoftCart.exe/phpinfo.htm?E+toolstore phpinfo() gives me: PHP_SELF /phpinfo.htm QUERY_STRING REQUEST_URI /phpinfo.htm SCRIPT_NAME /phpinfo.htm What other mechanisms do I have in PHP to check if the in the URL has a query string? Is there another server-side way to do this? bewildered, Richard McLean

« previous php.general (#12403) next »