This question has already been answered:
Tell me how to organize the CNC correctly There is an admin panel where the user can create categories of goods + categories 1 + category, etc., etc.
For example, the line would be: my-site.ru/index.php?review=shop&cat=appliance&v-cat=kitchen&b-cat=redmond-rmc-pm330
I bring to the browser:
my-site.ru/shop/appliance/kitchen/redmond-rmc-pm330/
In the .htaccess file:
RewriteRule ^([A-Za-z0-9-]+)/([A-Za-z0-9-]+)/([A-Za-z0-9-]+)/([A-Za-z0-9-]+)/$ index.php?review=$1&cat=$2&v-cat=$3&b-cat=$4[QSA,L] RewriteRule ^([A-Za-z0-9-]+)/([A-Za-z0-9-]+)/([A-Za-z0-9-]+)/$ index.php?review=$1&cat=$2&v-cat=$3 RewriteRule ^([A-Za-z0-9-]+)/([A-Za-z0-9-]+)/$ index.php?review=$1&cat=$2 RewriteRule ^([A-Za-z0-9-]+)/$ index.php?review=$1
How to write exactly in .htaccess? since so under the categories there can be no more 2 or 3, for example 10, isn’t it possible the next line and so on by analogy?
RewriteRule ^([A-Za-z0-9-]+)/([A-Za-z0-9-]+)/([A-Za-z0-9-]+)/([A-Za-z0-9-]+)/([A-Za-z0-9-]+)/$ index.php?review=$1&cat=$2&v-cat=$3&b-cat=$4&n-cat=$5[QSA,L]
Maybe there is a simple solution, is this really what everyone is doing?