Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

no redirecting?


Recommended Posts



I installed OSCommerce on a Windows XP workstation and am using Microsoft expression Web.

I have some cases where the redirection is not behaving correctly. <_<


E.g. After clicking on a product, reviews, add to basket : I get a white screen. Or just click a product and add to basket : the same white screen...

When checking the URL value in function tep_redirect (using echo commands) I get :

$url : "http://localhost:9988/mysite/catalog/shopping_cart.php?osCsid=cgq2ok0etnqrgjus9dt2phb740"


the address URL in the browser shows :



It looks as if the URL is not being replaced by the new one.

Now when I copy the url as shown by the echo and paste it in the browser's address, hit return, then I actually get the basket contents page (shopping_cart.php).


However if I click on checkout then, again the white screen will display... so there seems something wrong with the redirectioning.


Does anyone have any idea why this is happening?

All help is appreciated.


Best regards,


PS : the function reads :

// Redirect to another page or site

function tep_redirect($url) {

if ( (strstr($url, "\n") != false) || (strstr($url, "\r") != false) ) {

echo '<BR> before redirect $url: ' . $url ;

tep_redirect(tep_href_link(FILENAME_DEFAULT, '', 'NONSSL', false));



if ( (ENABLE_SSL == true) && (getenv('HTTPS') == 'on') ) { // We are loading an SSL page

if (substr($url, 0, strlen(HTTP_SERVER)) == HTTP_SERVER) { // NONSSL url

$url = HTTPS_SERVER . substr($url, strlen(HTTP_SERVER)); // Change it to SSL




echo '<BR> $url : ' . $url ;

header('Location: ' . $url);




Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...