What rule translates urls like so?
host.com/plastic_toys/pink_barbie/
host.com/index.php?q=plastic+toys+pink+barbie
The number of components in the category and product name vary.
Edit:
I guess this rule does part of the job:
RewriteRule ^([^/]*)/([^/]*)$ /index.php?q=$1+$2 [L]
The problem with the above rule is that it does not take care of converting underscores to +
, so it translates like this:
host.com/plastic_toys/pink_barbie/
host.com/index.php?q=plastic_toys+pink_barbie
I guess I have to delegate that conversion to PHP. Now is there a way to test if the rule actually does the conversion the way I imagine it would?