Simple steps for you
Step One: write in .htaccess
RewriteEngine on
RewriteRule ^(.+)/?$ test.php?url=$1
Step Two: test.php file with following code
<?php
$url = $_GET['url'];
echo '<pre>';
print_r($url);
echo '</pre>';
?>
NOTE: you can call explode
function on $url
variable
rewrite module
must be on in Apache server.

Note i think this will solve your problem
script is self explanatory but if confusion then tell me .
<?php
$url = $_GET['url'];
echo '<pre>';
print_r($url);
echo '</pre>';
//echo '<pre>';
///print_r(explode('/',$url,4));
//echo '</pre>';
list($file,$controller,$method,$params) = explode('/',$url,4);
echo "<hr/>file:" . $file;
echo "<hr/>controller:" . $controller;
echo "<hr/>method:" . $method;
echo "<hr/>params:" ;
echo '<pre>';
print_r($params);
echo '</pre>';
?>
Output 2
