you can get the variable values automaticly by this method
RewriteEngine On
RewriteBase /
RewriteEngine On Options All -Indexes RewriteBase /directoryname/ RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
############### SEO ##########################
#
http://www.example.com/hello/booboo/ it takes the url after .com/
RewriteRule ^(.*)$ getme.php?url=$1 [QSA,L]
for example if i enter http://www.example.com/hello/bobo/
it is going to replace and take "/hello/bobo/" part now you can use this in .htacces file Also if you want to redirect to another page and filter the variable value you should modify $1 because all data in this.
edit: in that example i get url after my domain and i redirect to get.php also you can divide the url using split method by "/" Let's see the get.php page to understand this method
getme.php:
<?php
//we redirect to get in url=$1 so our get method name is url
$parca = explode("/", $_GET["url"]); //and we divided by slash the url.
echo $parca[0];//this is first part "/hello/
echo $parca[1];// and this is second part "/booboo/;
?>