Hello, I did tons of methods to figure out how to make this mod rewrite but O was completly unsuccessful.
I want a .htaccess code that rewrite in the following method:
/apple/upcoming/2
→/handler.php?topic=apple&orderby=upcoming&page=2
This is easy to do, but the problem is that all parameters are not required so the link has different levels of parameters each time like this:
/apple/popular/2
→/handler.php?topic=apple&orderby=popular&page=2
/apple/2
→/handler.php?topic=apple&orderby=&page=2
/all/popular/2
→/handler.php?topic=all&orderby=popular&page=2
/apple/upcoming/
→/handler.php?topic=apple&orderby=upcoming&page=
So briefly, the URL has 3 optional parameters in one static order: (topic) (orderby) (page)
Note: the ORDERBY parameter can be "popular" or "upcoming" or nothing.
Thanks