So I have a single file forums.php which can process both forums.php?category_id=X and forums.php?topic_id=X
When rewrite the URL to forums/category_id/X and forums/topic_id/X I can't get it to work. Nginx has some trouble understanding that there are 2 separate parameters. Here's what I have now:
rewrite ^/forums/(.*)$ /forums.php?topic_id=$1 last;
rewrite ^/forums/(.*)$ /forums.php?category_id=$1 last;
It's not able to get the id at the end and just returns null on the sql query... Can anyone help?
And figured it out...