I’m writing my first CI application, and would like to use URI’s as the following:
http://www.domain.com/users/3,10,a,3
which would be; “list of 10 users starting from id 3, sorted ascending on field #3” (obviously the last (3) could be the name of the field).
I’m trying to do this with mod_rewrite, leaving CI alone as much as I can. Current RewriteRule
^issues/([0-9]+),([0-9]+),(a|d|),([0-9]*)$ /index.php/issues/get/from/$1/to/$2/order/$3/field/$4 [L]
allows for ‘users/3,10,,’ and CI would see:
http://www.domain.com/users/from/3/num/10/order//field/
The problem now comes with uri_to_assoc() which gives the following:
Array
(
[from] => 1
[to] => 2
[order] => field
)
The last bit is obviously not correct.
Googling didn’t help, but does somebody know how to let mod_rewrite set a default value for a ‘$X’ if it matched on the ‘empty_string’ ?
