Hi, On Mon, Feb 6, 2017 at 11:34 AM, Rajib Karmakar <creativeweblogo@xxxxxxxxx> wrote: > > RewriteRule ^cart(.*)$ cart.php > > https://www.berkshirefurniture.com/cart/ [] > > https://www.berkshirefurniture.com/carter-upholstered-bed/p/bmV3LWFycml2YWw= > > ## 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 match the specific slug and forced > not to redirect it's default rules i.e it matched the full slug and redirect > to specific rule only. Not sure what you mean, but as already suggested, why not avoid matching anything but /cart or /cart/.* in the first place: RewriteRule ^cart(/|$) cart.php ? And shouldn't the same principle also apply to the first RewriteCond: RewriteCond %{REQUEST_URI} !^/([^/]*)/p/ ? Regards, Yann. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx