Hello David
i found this post http://www.pricetapestry.com/node/4098 for how to rewrite products url and works fine
how i can rewrite categories, brands, merchants urls ?
site.com/merchant to site.com/m
site.com/brand to site.com/b
site.com/category to site.com/c
thanks
Hi George,
Firstly, use your text editor's Search and Replace feature to make the required changes to .htaccess as follows:
merchant/
...REPLACE with:
m/
...and exactly the same with brand/ to b/ and category/ to c/ (3 instances of each)
Then all you need to do is change the links anywhere that link to the existing rewrites to the shorter version. In the distribution, this is just in index.php, so change the Merchant A-Z look for the following code at line 18:
print "<a href='".($config_useRewrite?"merchant/":"merchants.php")."'>".translate("merchant")."</a>, ";
...and REPLACE with just:
print "<a href='/m/'>".translate("merchant")."</a>, ";
...and similarly for category and brand at lines 20/22.
There is a final change required for merchants which is the merchant search URL included in the price comparison table. For this instance, edit products.php and look for the following code at line 29:
$rows[$k]["merchantHREF"] = $config_baseHREF."merchant/".urlencode(tapestry_hyphenate($row["merchant"]))."/";
...and REPLACE with:
$rows[$k]["merchantHREF"] = $config_baseHREF."m/".urlencode(tapestry_hyphenate($row["merchant"]))."/";
Cheers,
David.
--
PriceTapestry.com