DevHeads.net

Postings by Rajib Karmakar

uniqueness for each rules so that it hit to specific page.

Hello,

Issues Facing for multiple htaccess rule for dynamic slug.
Mainly for an eCommerce website starting from which has
Department,category,subcategory,subsubcategory and product

Sitepath are follows from department to subsubcategory
<a href="http://www.mysite.com/department" title="http://www.mysite.com/department">http://www.mysite.com/department</a>
<a href="http://www.mysite.com/department/category/" title="http://www.mysite.com/department/category/">http://www.mysite.com/department/category/</a>
<a href="http://www.mysite.com/department/category/subcategory" title="http://www.mysite.com/department/category/subcategory">http://www.mysite.com/department/category/subcategory</a>
<a href="http://www.mysite.com/department/category/subcategory/subsubcategory" title="http://www.mysite.com/department/category/subcategory/subsubcategory">http://www.mysite.com/department/category/subcategory/subsubcategory</a>

Without department path from category to subsubcategory
<a href="http://www.mysite.com/category/" title="http://www.mysite.com/category/">http://www.mysite.com/category/</a>
<a href="http://www.mysite.com/category/subcategory" title="http://www.mysite.com/category/subcategory">http://www.mysite.com/category/subcategory</a>
<a href="http://www.mysite.com/category/" title="http://www.mysite.com/category/">http://www.mysite.com/category/</a>

E-commerce Rewrite Rule

Good morning Team,

Below 4 URL in my e-commerce, please guide me right rewriterule for it.

1. domain.com / Clothing[Department] / Mens[Main Catagory] / Shirts[Sub
Catagory] / T-Shirts [Sub Sub Catagory] / White Shirt [product_id=15]

2. domain.com / Mens[Main Catagory] / Shirts[Sub Catagory] / T-Shirts [Sub
Sub Catagory] / White Shirt [product_id=15]

3. domain.com / Clothing[Department] / Mens[Main Catagory] / Shirts[Sub
Catagory] / White Shirt [product_id=15]

4.

.htaccess rule match keyword

Hi,

RewriteRule ^cart(.*)$ cart.php

<a href="https://www.berkshirefurniture.com/cart/" title="https://www.berkshirefurniture.com/cart/">https://www.berkshirefurniture.com/cart/</a>

<a href="https://www.berkshirefurniture.com/carter-upholstered-bed/p/bmV3LWFycml2YWw=" title="https://www.berkshirefurniture.com/carter-upholstered-bed/p/bmV3LWFycml2YWw=">https://www.berkshirefurniture.com/carter-upholstered-bed/p/bmV3LWFycml2...</a>

## For showing leaf sub category of item
RewriteCond %{REQUEST_URI} !^/([^/]*)/p
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^/]*)/([^/]*)/([^/]*)$ leafsub-category-gallery.php?
slug=$1&subcat=$2&leafsubcat=$3 [L,NC]

First four letter of products url "carter" to "cart" matched with the cart
page link and that's the reason it moved to the cart page.

Is it possible using htaccess rewriting

https://www.berkshirefurniture.com Issue on .htaccess rule.

Good morning Team,

Below 2 rule i used for 2 different pages but 2nd URL when i click then it
nothing display any products, it show cart page.