Zend Framework: Apache decrypts a coded URL instead of passing a coded URL?

I am testing my Zend Framework application using Selenium and PHPUnit. I have a test that should open a URL containing an encoded URL.

$redirectToLocation = urlencode('/myothercontroller/action'); // %2Fmyothercontroller%2Faction
$this->openAndWait('/controller/action/thenRedirectTo/' . $redirectToLocation);

But when I run my test, the browser tried to open the decoded URL:

/controller/action/thenRedirectTo//myothercontroller/action

What should I do to get selenium to open an encoded URL?

Update: Actually ... it turns out that selenium does the job, but it seems like Apache decrypts the URL before it gets to the controller:

The requested URL /controller/action/thenRedirectTo//myothercontroller/action was not found on this server.

How do I fix this problem?

: , : http://old.nabble.com/URL-Encoding-td18850769.html. , base64 URL-, . , , , .

: , , , Zend Framework . , ?

+5
5

"Apache". (php). uri uri uri .

, , AllowEncodedSlashes On . Apache. , - , .htaccess.

+2

. URL- , .. /Controller/action/thenRedirectTo? Q =% 2Fmyothercontroller% 2Faction, Apache , , re .

URL-, .

$redirectToLocation = urlencode(urlencode('/myothercontroller/action'));
$this->openAndWait('/controller/action/thenRedirectTo/' . $redirectToLocation);

, Apache .

0

, mod_rewrite, . , - urlencode URL- , .

0

mod_rewrite Apache , :

RewriteEngine on
RewriteLog /tmp/rewrite.log
RewriteLogLevel 9

ZF. % {QUERY_STRING}, URL-. % {THE_REQUEST}, - URL-. % {THE_REQUEST} .

base64- URL-, mod_rewrite URL-.

- [B] mod_rewrite, : mod_rewrite Apache?. , .

0

All Articles