mod rewrite
hey Ray
Trying to modify a url structure from this
domain.co.uk/product/product-name
to this
domain.co.uk/product/manufacturer-name/product-name
The current rewrite is
RewriteRule ^product/(.*)$ shop_product_detail.php?perm=$1 [NC,L,QSA,T=application/x-httpd-php]
and the recordset on the product detail page is
<?php
$Products = new WA_MySQLi_RS("Products",$DBConnection,1);
$Products->setQuery("SELECT products.*, productcategories.*, productmanufacturers.*, (SELECT sum(OptionPrice) FROM optiongroups INNER JOIN options ON options.OptionGroupID = optiongroups.OptionGroupID WHERE OptionProductID=ProductID) AS OptionPrice FROM products INNER JOIN productcategories ON products.ProductCategoryID = productcategories.CategoryID INNER JOIN productmanufacturers ON products.ProductManufacturerID = productmanufacturers.ManufacturerID WHERE products.ProductID = ? OR products.ProdPermalink = ? AND products.ProductLive = 1");
$Products->bindParam("i", "".(isset($_GET['id'])?$_GET['id']:"") ."", "-1"); //paramProductID
$Products->bindParam("s", "".(isset($_GET['perm'])?$_GET['perm']:"") ."", "-1"); //paramPermalink
$Products->execute();
?>
What would I need to change/modify to achieve this?
Many thanks
Jamie