Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

rewriteURL problem... PLEASE HELP


Recommended Posts

I have added to the tep_href_link function in html_output.php the following bits of code:


if (ereg("cPath=([_,0-9]+)" ,$parameters , $regs) && strstr($page,"default.php"))


$parameters = "";

$page = "default" . $regs[1] . ".php";



if (ereg("cPath=([_,0-9]+)&products_id=([0-9]+)(.*)" ,$parameters , $regs) && strstr($page,"product_info.php"))


$parameters = ""; // No longer necessary to add parameters

if ($regs[3])


$regs[3] = "?" . substr($regs[3], 1);

$page = "product_info_c" . $regs[1] . "p" . $regs[2] . ".php" . $regs[3] ;



$page = "product_info_c" . $regs[1] . "p" . $regs[2] . ".php" ;




This , in theory, changes "default.php?cPath=25" to "default25.php" which makes it look like a distinct webpage. It also rewrites

the product info file references to the described format (products_infoc25_1p200.php).

Everything works fine (ie rewriting the URL's to the described format) however when I actually click on the link my server tells me "no input file specified". Does anyone have any ideas why my server is not picking up, for example, default37.php as default.php.cPath=37??!! :?

I checked in the apache access logs and got.. - - [30/Apr/2003:16:56:35 +0900] "GET /catalog/product_info_c23_29p31.php HTTP/1.1" 200 37

So, according the apache documentation, the 200 above is the status code and anything that begins in 2 has resulted in a successful response. Unfortunately the 37 bytes suggests that something has gone extremely wrong.

Anyone have any ideas as to what is going wrong. I am all EARS.

Look forward to hearing from anyone.


Link to comment
Share on other sites


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

  • Create New...