I am trying to set up a hierarchy five levels deep with mod_rewrite
. This is what I have put together at this point. It works for the last two levels (the first and second rule) but not after that. Any help would be well appreciated.
RewriteRule ^([^/]*)/([^/]*)/([^/]*)/([^/]*)/([^/]*)$ /mr/index.php?product_group=$1&product_family=$2&product_category=$3&product_sub_category=$4&product=$5 [C]
RewriteRule ^([^/]*)/([^/]*)/([^/]*)/([^/]*)$ /mr/index.php?product_group=$1&product_family=$2&product_category=$3&product_sub_category=$4 [C]
RewriteRule ^([^/]*)/([^/]*)/([^/]*)$ /mr/index.php?product_group=$1&product_family=$2&product_category=$3 [C]
RewriteRule ^([^/]*)/([^/]*)$ /mr/index.php?product_group=$1&product_family=$2 [C]
RewriteRule ^([^/]*)$ /mr/index.php?product_group=$1 [L]
I am not a server tech. I am a developer and just can't figure this out. Each of these rules works fine by itself. I need the rule(s) to work from one level to five and every step in between. I need a drill down style navigation that is SEO friendly.