mod_rewriteを使用してWebページのURLを再帰的に変更しようとしていますが、この状況での書き換えルールを理解できません。
URLをパターンから変更したい
http://mywebsite.com/token1-token2-token3-token4-categoryname
に
http://mywebsite.com/?cat=categoryname&search=token1+token2+token3+token4
課題は、URL内のトークンの数が異なる可能性があるため、トークンのマッチングと変換を再帰的に処理する必要があることです。これをどのように達成できるかについてのアイデアはありますか?