// HTACCESS FILE
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* index.php
</IfModule>
// PHP SIDE
<?php
// Base host for the client assets (js, css, image)
$host = dirname($_SERVER["SCRIPT_NAME"])."/";
// Base root for the server side (like for the php inclusion)
$root = dirname(__FILE__)."/";
// Array of arguments passed in the adresse bar
$args = explode("/",str_replace(dirname($_SERVER["SCRIPT_NAME"])."/", "", $_SERVER["REQUEST_URI"]));
?>