Forum Moderators: coopster

Message Too Old, No Replies

403 Forbidden Error on Passing parameters in PHP?

Passing parameters in PHP?

         

kijkij

9:45 am on May 18, 2010 (gmt 0)

10+ Year Member




1. Suppose that I have a PHP page with code:

<?php echo "Hello World";?>


If I point my browser to this page, its work well. And if I point by

http://www.mydomain.com/?q=something


It will still work, BUT If I USE:

http://www.mydomain.com/?q=http://www.yahoo.com

Then on some server it works and on some server I get Error: 403 Forbidden You don't have permission to access / on this server.

WHY this happened on some servers?

2. How can I handle in PHP if I pass parameter in the form:

http://www.mydomain.com/url/http://www.yahoo.com

On some domains I have seen working in this way but I dont know how to handle it as server will look
for the directory "http://www.yahoo.com" and if no one then I will get 404 error....?

jatar_k

1:27 pm on May 18, 2010 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



1. those server don't sound like they are configured properly, do you get the same issue if you input www.mydomain.com/ without the query appended? Maybe it is the http

2. www.mydomain.com/url/http://www.yahoo.com

this is improper format, it has nothing to do with PHP but with the web server software, it is handling it properly, the format is just wrong. You need to append it as a query string.