<?php
$actual_link = "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
print_r(parse_url($actual_link));
echo '<br>';
echo parse_url($actual_link, PHP_URL_PATH);
?>
/htacces
Options +FollowSymLinks
RewriteEngine On
RewriteRule ^(.*)$ index.php [NC,L]