I have a Selenium/PHPUnit test that needs to open a URL that contains an encoded URL.
$redirectToLocation = urlencode('/myothercontroller/action'); // %2Fmyothercontroller%2Faction
$this->openAndWait('/controller/action/thenRedirectTo/' . $redirectToLocation);
But when I run my test, the browser tried opening the decoded URL:
/controller/action/thenRedirectTo//myothercontroller/action
What should I do to get selenium to open the encoded URL?
Update: Actually...turns out selenium is doing it's job, but Apache is decoding the URL before it gets to the controller:
The requested URL /controller/action/thenRedirectTo//myothercontroller/action was not found on this server.
How should I fix this problem?
Update: Here's a whole conversation about the same problem that I'm having: http://old.nabble.com/URL-Encoding-td18850769.html. Their workaround was to base64 encode the url, but that's not good enough for me. I may use this solution in the short term, but I want to know what is the real cause of this problem, so I can eliminate it.