mod rewrite
Hey Ray
At the moment I have product page urls being rewritten like this domain.co.uk/product/product/name
The mod rewrite is
RewriteRule ^product/(.*)$ shop_product_detail.php?perm=$1 [NC,L,QSA,T=application/x-httpd-php]
The RS on the product 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();
?>
How and what would I need to change to add an extra layer in the URL to include the manufacturer name like this:
domain.co.uk/product/maufacturer-name/product-name
many thanks
Jamie