kkhajuria Posted February 28, 2009 Posted February 28, 2009 Hi, Please help me with the following problem I am facing. The URL redirection worls fine for me if the redirected URL is something like www.abc.com but it goes back to home page if the redirected URL is something like www.abc.comgp/product/B001BZJ54U?ie=UTF8&tag=ds-20&linkCode=as2&camp=1789&creative=9325&creativeASIN=B001BZJ54U. Thanks, Kaushik Khajuria
kkhajuria Posted March 1, 2009 Author Posted March 1, 2009 Hi, To add more info to the problem, the following piece of code in redirect.php works if the url to be redirected to is www.abc.com but not if it is something like www.abc.com/redirect.php?action=url&goto=www.amazon.com/gp/product/B001BZJ54U?ie=UTF8&tag=ds-20&linkCode=as2&camp=1789&creative=9325&creativeASIN=B001BZJ54U if (isset($HTTP_GET_VARS['goto']) && tep_not_null($HTTP_GET_VARS['goto'])) { $check_query = tep_db_query("select products_url from " . TABLE_PRODUCTS_DESCRIPTION . " where products_url = '" . tep_db_input($HTTP_GET_VARS['goto']) . "' limit 1"); if (tep_db_num_rows($check_query)) { tep_redirect('http://' . $HTTP_GET_VARS['goto']); } } Please help. Thanks, Kaushik Khajuria
Guest Posted March 1, 2009 Posted March 1, 2009 what type of redirection? tep_redirect? .htaccess? header()? Please provide more detailed examples. -jared
kkhajuria Posted March 1, 2009 Author Posted March 1, 2009 Thanks for your reply Jared. Its tep_redirect. Thanks. Kaushik what type of redirection? tep_redirect? .htaccess? header()? Please provide more detailed examples. -jared
andreanew Posted March 1, 2009 Posted March 1, 2009 Thanks for your reply Jared. Its tep_redirect. Thanks. Kaushik I just have the same problem. I call my server and they say that it is due to a difference betwen: $HTTP_SERVER_VARS -> $_SERVER $HTTP_GET_VARS -> $_GET $HTTP_POST_VARS -> $_POST in other words: It occurs when upgrading to php5 from php 4. Download your whole site & use a text editor to find and replace these variables. These unsupported variables can also cause the following problems: Broken links Broken forms Broken carts etc. basically any file/page that relies on information being passed to it will fail on php 5 without these changes. I assume this is all dealt with in later versions of oscommerce..? I just star with the blank version of the server, in my case my server has its version of oscommerce with the new php5, so Ihave to rebuild from 0. I found it after a week of not sleep. I hope it helps. I have a long night ahead. :blink: Andrea
andreanew Posted March 1, 2009 Posted March 1, 2009 Thanks for your reply Jared. Its tep_redirect. Thanks. Kaushik I just have the same problem. I call my server and they say that it is due to a difference betwen: $HTTP_SERVER_VARS -> $_SERVER $HTTP_GET_VARS -> $_GET $HTTP_POST_VARS -> $_POST in other words: It occurs when upgrading to php5 from php 4. Download your whole site & use a text editor to find and replace these variables. These unsupported variables can also cause the following problems: Broken links Broken forms Broken carts etc. basically any file/page that relies on information being passed to it will fail on php 5 without these changes. I assume this is all dealt with in later versions of oscommerce..? I just star with the blank version of the server, in my case my server has its version of oscommerce with the new php5, so Ihave to rebuild from 0. I found it after a week of not sleep. I hope it helps. I have a long night ahead. :blink: Andrea
kkhajuria Posted March 1, 2009 Author Posted March 1, 2009 Hi Andrea, Thank you very much for your reply. I did tried your recommendations but the problem is still persisting. I think the following query in redirect.php $check_query = tep_db_query("select products_url from " . TABLE_PRODUCTS_DESCRIPTION . " where products_url = '" . tep_db_input($_GET['goto']) . "' limit 1"); is somehow not generating the correct result and the redirection goes to the default page instead of the url mentioned in products_url table. Please tell me if there is anything else to be taken care of. Thanks, Kaushik
Recommended Posts
Archived
This topic is now archived and is closed to further replies.