Passing php variable using url

Hi,
I can show via example,

link at localhost are working fine ,

with the $_GET[‘l’] function

[B]http://localhost/link.php?l=1[/B] shows 1
and
[B]http://localhost/link.php?l=http://www.xyz.com[/B] shows http://www.xyz.com

On the actual shared host.

link [B]http://www.abc.com/link.php?l=2[/B] is giving output 2 with the $_GET[‘l’] function, which is working fine But,
[B]http://www.abc.com/link.php?l=http://www.xyz.com[/B] shows

[B]Forbidden

You don’t have permission to access /go.php on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.[/B]

Why Passing url as php variable is not accepting in shared server?
Is there something to do with php.ini settings or .htaccess settings ?
What should I write in them?

Thanks in advance.

When passing strings such as URL’s for example as values in a parameter list you need to encode it otherwise the browser assumes it’s a link and trys to goto that url. See the following links:

http://php.net/manual/en/function.urlencode.php
http://www.php.net/manual/en/function.urldecode.php