recently i came across strange problem while uploading files to my new server.
I am using $_SERVER['REQUEST_URI'] to find the current page location and add some param and redirect as following:
<a href="<?php echo $_SERVER['REQUEST_URI'].'&action=edit&uin=1';?>">Edit</a>
It works fine in my local computer and redirects to my page :
localhost/admin/home.php?module=Pages&action=edit&uin=1
and my tag:
<a href="http://localhost/sitename/admin/home.php?module=Pages&action=edit&uin=1">Edit</a>
but in my testing server it generated url without servername so it became like:
<a href="http://admin/home.php?module=Pages&action=edit&uin=1">Edit</a>
and redirected to : http://admin/home.php?module=Pages&action=edit&uin=1
resulting redirect to invalid page...
So wondering which server setting is creating that difference?
And how can we solve it? both resulting same