i need to change my url seo friendly with url routing : i need to know how i change my site url my i try url routing what is not work
my site product url is => [http://www.shahilibas.in/product.php?p_id=5] and i want seo friendly url like [http://www.shahilibas.in/product.php/5]
i try this code for url routing 

function getCurrentUri()
	{
		$basepath = implode('/', array_slice(explode('/', $_SERVER['SCRIPT_NAME']), 0, -1)) . '/';
		$uri = substr($_SERVER['REQUEST_URI'], strlen($basepath));
		if (strstr($uri, '?')) $uri = substr($uri, 0, strpos($uri, '?'));
		$uri = '/' . trim($uri, '/');
		return $uri;
		echo $uri;
	}
