I've found sort of a make shift way of doing this with PHP and a WordPress function.
Here's the lowdown. In your template code include the $wp_query global variable and then use its query property, which, is an array. One of those array indexes is called 'pagename' and what it does is return the request uri of the page in question. So suppose your url is http://website.com/profile/johndoe and your WordPress installation is in your webroot then this code:
global $wp_query;
echo $wp_query->query['pagename']
will putout 'profile/johndoe'.
However, if url is: http://website.com/cms/profile/johndoe which means that your WordPress install in the cms directory and not webroot, the above code will still return profile/johndoe, which means, it takes into account what the difference between the WordPress Adress and the Site Address are set to in the settings panel.
So anyways, the good part is tht you can take this output and split into an array like so:
$segments = array_explode('/', $wp_query->query['pagename']);
I believe the first segment (profile in this case would be the assigned to the first index of the array and so on.).
Anyways, it's not quite as nice as CodeIgniter but it doesn't take much code to do and it does the trick.