hiding scriptName not working in CActiveForm

Hi,

My Yii based app has 3 envoirements, dev, test and prod. In all 3 envs, "showScriptName" is set to "false". And in each env, all requests will be rewritten to corresponding entry script, e.g. in the dev env, all requests are rewritten to "index-dev.php", in test env, all rewritten to "index-test.php" and in prod env, all to "index.php".

Then I used Gii generated the crud for one of my module in the test env(linux), the generated code is using “CActiveForm” class to render the markup. The problem is that the action property of the generated form is still “/index-test.php/mymodule/mycontroller”, I var_dumped the ‘showScirptName’ configuration in the test env, and it showed “false” which I believe is what I wanted. Still it seemed not working properly coz as said the generated form still has “index-test.php” prefixing the action of the form. The strange thing is that this problem doesn’t exit in the dev environment, which is on windows(same php version 5.3). What could be the possible cause?

Thanks in advance for your help.

CactiveForm uses current url for the action property if it’s not specified. The current url is calculated by CHtml::normalizeUrl() which uses $_SERVER[‘REQUEST_URI’] to construct the url, in my case $_SERVER[‘REQUEST_URI’] includes the script name. I thought Yii would remove the script name automatically if it’s turned off but it didn’t. I don’t want to hack the Yii code. Still haven’t got a decent solution for the problem. Please help.