User friendly urls

Hi,

I been following this guide: using-search-engine-and-user-friendly-urls

  1. i changed the main.php

  2. i added the htaccess to my root

  3. i created the ActiveRecords.php in my components directory

domain.com/?r=mymodule works

but

domain.com/mymodule doesnt, shows me the index

am i forgetting something here?

Show us it?

Is Apache’s mod_rewrite enabled?

I didn’t get this step…

Gerd, with the information your have provided it is difficult to help you.

Maybe you forgot add ‘urlFormat’=>‘path’ to your urlManager configuration?

http://www.yiiframework.com/doc/guide/1.1/en/topics.url

no i added it to, but the urls keep dropping me to the index

	'urlManager'=>array(


		'urlFormat'=>'path',


		'rules'=>array(


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


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


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


		),


	),

Are you sure that this urlManager is in the components section of configuration?

The configuration as it is should work.

Gerd,

I think you should try to give us a copy of:

a) your .htaccess file containing the mod rewrite

B) your main.php config file containing the Url manager rules

c) an example of the parameters you are passing to createUrl, like $this->createUrl(‘myModule/myController/myAction’, array(‘id’ => 1))

d) the Url that is being returned by this call.

With that information we are more likely to be able to see where the problem lies. From what you’ve said so far, I would guess that Url rewriting is working (since index.php is taken out of the Url), but maybe whatever link you are trying to make doesn’t find a corresponding rule in the Url Manager.