Slashes in URL are changed to forward slashes for no reason?



I have a PHP workspace, where there is a URL like this:\Controllers\SelectLanguage

But in the logs, I can see “GET /index.php?ctrl=Installer/Controllers/SelectLanguage HTTP/1.1”. The slashes in the ctrl parameter value have been changed to forward slashes.

It works fine in my local and my web server. This strange behaviour only happens in Cloud9. Any idea how to fix it?



It sounds like the HTTP proxy Cloud9 uses might be changing the slashes before it reaches your server. If that’s the case, then I’m not aware of a good solution, maybe @moderators can help?


Thank Danny. How does this proxy work? I found that it seems there is a different IP address on every pageview which is kind of breaking some of my validation logic that assumes visitors would stay on the same IP address during a visit.


We traced the issue to a bug in nodejs url module.
Will fix it soon.


Thanks, please let me know once the bug is fixed.

Regarding to the IP address, is there anyway to work around it so the server can see my actual IP address or at least it won’t be changed randomly for every page view?


how do you detect the ip address?
I think x-forwarded-for header should stay the same, but the actual connection ip can’t stay the same, since it is the ip of the proxy server, and the load balancer picks the one that is free.


I am using $_SERVER[‘REMOTE_ADDR’] to detect IP address


That doesn’t work when running behind a proxy see