I have the following url's
http://somesite.com/1/
http://somesite.com/1/somecategory/
http://somesite.com/1/somecategory/3/
I need to transform this to
script.php?siteid=1&category=somecategory&page=3
I have write a pattern for this rewrite:
^([0-9]+)(/(.[^/]+)/(.[^/]+))?
But the problem is that it only recognize
http://somesite.com/1/somecategory/3/
I need to know how to make so that if i don't enter the second or the third parts of the path, to still be recognized and to assign this as null values
So if i have http://somesite.com/1/
the mod_rewrite to make it
script.php?siteid=1&category=&page=