Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I have setup the python proxy.cgi in cgi-bin folder in my server.

[myserver]/cgi-bin/proxy.cgi returns the openlayers website

[myserver]/cgi-bin/proxy.cgi?url=www.openlayers.org returns list index out of range (www.openlayer.org is defeined in the allowed host)

[myserver]/cgi-bin/proxy.cgi?url="www.openlayers.org" returns list index out of range (www.openlayer.org is defeined in the allowed host)

[myserver]/cgi-bin/proxy.cgi?url=http://www.openlayers.org returns page not found

[myserver]/cgi-bin/proxy.cgi?url="http://www.openlayers.org" returns page not found

The proxy is working, but if i use url without http it gives list index out of range, if i use http in url the script is failing.

The url i wasnt to access is http://www.openstreetmap.org/api/0.6/way/190554764 and the cross domain issue is not allowing.

share|improve this question
    
Do you see anything in the apache logs? –  Devdatta Tengshe Apr 22 '13 at 7:25

1 Answer 1

up vote 1 down vote accepted

You need to encode special characters (colons, slashes) in the url you want to access. In JavaScript you can use encodeURIComponent(), e.g. '[myserver]/cgi-bin/proxy.cgi?url=' + encodeURIComponent('http://www.openlayers.org')

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.