On the site we have the product area where there may be N levels and sub-levels of categories. Currently htaccess is configured to accept 2 levels:
RewriteRule ^([a-zA-Z_-]+)/produtos/([^/]*)/([^/]*)/([^/]*) index.php?area=produtos&lang=$1&n1=$2&n2=$3&n3=$4 [NC,QSA,L]
RewriteRule ^([a-zA-Z_-]+)/produtos/([^/]*)/([^/]*) index.php?area=produtos&lang=$1&n1=$2&n2=$3 [NC,QSA,L]
RewriteRule ^([a-zA-Z_-]+)/produtos/([^/]*) index.php?area=produtos&lang=$1&n1=$2 [NC,QSA,L]
The URL looks like this:
localhost / en / products / 1-shoes / 5-leather / 15-shoeXPTO
localhost / en / products / 1-shoes / 5-leather
localhost / en / products / 1-shoes
It works perfectly for 2 levels of categories, however I want to eliminate this limitation and allow N category levels.
How do I pass to index.php what's ahead of "products /" regardless of how many levels?