2012-03-22 80 views
0

我正在爲舊的OsCommerce網站301重定向。問題是它託管在IIS/Windows服務器上,所以htaccess modrewrite不是一個選項。不明原因的解析錯誤

在這一點上我已經重定向如下

Header("HTTP/1.1 301 Moved Permanently"); 
Header("Location: http://www.site.org.au/store/default.asp"); 
exit(); 

但是因爲老店的網址是動態的,我想基礎上,CPATH =東西的corrisponding頁面上的新的網站重定向。到目前爲止,我有

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(); 
} 

問題是這個,我得到一個錯誤:

解析錯誤:語法錯誤,在電子商務意外T_STRING:\的Inetpub \ esvc001202 \的index.php

我會感謝任何提示,讓這個工作。

感謝

乾杯 勞倫斯

回答

2

引用這個字符串:

if ($cPath == "22_33") 
+0

你一個冠軍AD7six,總是那麼簡單的,幾乎總是:-) – 2012-03-23 00:47:40