views:

11

answers:

1

I have the following RewriteRule on my Apache with ZendFramework in the back:

RewriteRule ^/account([0-9]+) /account?i=$1 [L]

Problem that I'm having is that I have an AccountController.php for ZendFramework, so URL from browser going to ...://myserver/account works just fine. However, when I have this rewriterule in httpd.conf, and point my browser to ...://myserver/account1, then ZendFrameworks complains that /account1 controller is not found, even though I have the rewriterule in apache. My guess is that ZF is looking at the REQUEST_URI which still have /account1 in it.

Anyone knows now I can make this rewriterule work properly with ZF? What I need is basically to have URLs going to /account([0-9]+) forward to /account?i=$1 instead using my ZF's AccountController.php?

Note I do not want to 'expose' the 'i' param to users (for various reasons, and yes, they could guess at looking at account1 that it can be sequenced), hence it is an internal forward instead of an external redirect back to the browser.

Thanks!

A: 

Maybe your rule is overwritten by other Zend rules? By default, Zend takes URLs in the form controller/key1/value1/key2/value2/..., maybe you could just try this?

Larry_Croft