I came across some htaccess url rewrite rules which are conflicting to existing url.
To write my category pages to www.mydomain.com/categoryname.html
I'm using following rule which is working fine but all my other pages like www.mydomain.com/about.html shows 404 not found
RewriteRule ^([^/]*)\.html$ /category_parent.php?ctg=$1 [L]
To write my product pages like www.mydomain.com/25/productname.html
I'm using following code which is also working fine
RewriteRule ^([^/]*)/([^/]*)\.html$ /product.php?id=$1&url=$2 [L]
but the above rewrite rule conflicting with sub category pages for which I'm using following code:
RewriteRule ^([^/]*)/([^/]*)\.html$ /category_child.php?pctg=$1&ctg=$2 [L]
In brief, I want to write to,
www.mydomain.com/categoryname.html
www.mydomain.com/categoryname/subcategoryname.html
www.mydomain.com/25/productname.html
But Some rules messing with each other. I'll appreciate if you can provide me little clue on this.