我想在 htaccess 中为以下 URL 创建 URL 重写规则。
http://example.com/vedios/category/fun/ -> http://example.com/vedios/category.php?cat=fun
http://example.com/vedios/category/fun/?show=popular -> http://example.com/vedios/category.php?cat=comedy&show=popular
http://example.com/vedios/category/fun/?show=popular&page=2 -> http://example.com/vedios/category.php?cat=comedy&show=popular&page=2
http://example.com/vedios/category/fun/comedy/ -> http://example.com/vedios/category.php?cat=comedy
http://example.com/vedios/category/fun/comedy/?show=popular -> http://example.com/vedios/category.php?cat=comedy&show=popular
http://example.com/vedios/category/fun/comedy/?show=popular&page=3 -> http://example.com/vedios/category.php?cat=comedy&show=popular&page=3
我试过但它不起作用RewriteRule category/([^.]+)/?([^.]+)$ /vedio/category.php?cat=$1&$2
。http://example.com/vedio/category.php?cat=fun&show=popular&page=1
请告诉我上述要求的正确 URL 重写规则是什么?