Tricky URL rewrite

Hello everyone,

I have the following rewrite rule set up in my main.php configuration file:




...

'rules'=>array(

  '/<slug:[A-Z]+>' => 'url/redirect',

  '<controller:\w+>/<id:\d+>'=>'<controller>/view',

  '<controller:\w+>/<action:\w+>/<id:\d+>'=>'<controller>/<action>',

  '<controller:\w+>/<action:\w+>'=>'<controller>/<action>',

),

...



so it means, that all the requests that come in as: exmple.com/AABC(etc), get sent to my Url controller, redirect action.

It actually works perfectly, as long as I have showScriptName=true. (but my links have the "ugly" index.php in the Url :confused: )

How can I use showScriptName=false, and keep my rewrite rule …

thanks,

–iM

Hmm, it should work the same with showScriptName=false. What happens if you disable it?

Oh, and maybe try to leave away the ‘/…’ on the first rule and add a separate ‘/’ rule for your start page. Other than that i don’t see, why it shouldn’t work without index.php.