为什么从远程主机上的URL中删除尾部斜杠?

my url's work in localhost with this code

    print "REQUEST_URI :".$_SERVER['REQUEST_URI'];print '<hr/>';
    print "site:".$site=str_replace('index.php','',$_SERVER['PHP_SELF']);print '<hr/>';
    print "REQUEST_URI:". $REQUEST_URI=str_replace($site,'',$_SERVER['REQUEST_URI']);print '<hr/>';

and resutls are

REQUEST_URI :/manogham/admin/login

site:/manogham/

REQUEST_URI:admin/login

but in server results are defirents

REQUEST_URI :/admin/login/

site:/

REQUEST_URI:adminlogin

/ are remove from url why !!!!

On the server

print "site:".$site=str_replace('index.php','',$_SERVER['PHP_SELF']);print '<hr/>';

is "/" as you can see on your results. $site is then "/". When you do

$REQUEST_URI=str_replace($site,'',$_SERVER['REQUEST_URI']);

you remove all $site ("/") from the REQUEST_URI That's why there is no more / displayed