I am working on a 301 redirect for an old OsCommerce website. The problem is it is hosted on a IIS/Windows server so htaccess modrewrite is not an option.
At this point I have redirected as follows
Header( "HTTP/1.1 301 Moved Permanently" );
Header( "Location: http://www.site.org.au/store/default.asp" );
exit();
However because the old shop URls are dynamic I am trying to redirect based on the cPath=something to the corrisponding page on the new site. So far I have
if (isset ($_GET['cPath']))
{
$cPath = $_GET['cPath'];
if ($cPath == 22_33) { $goto = "http://www.store.org.au/store/shop_clothing/shop_clothing_summer_adults_ladies"; }
if ($cPath == 21) {$goto = "http://www.cancervic.org.au/store/shop_shade"; }
header("HTTP/1.1 301 Moved Permanently");
header("Location: " . $goto);
exit();
}
problem is with this I get an error:
Parse error: syntax error, unexpected T_STRING in E:\inetpub\esvc001202\index.php
I'd appreciate any tips on getting this to work.
Thanks
Cheers Laurence