nbgerd
(Gerd)
January 29, 2011, 7:23pm
1
Hi,
I been following this guide: using-search-engine-and-user-friendly-urls
i changed the main.php
i added the htaccess to my root
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?
andy_s
(Arekandrei)
January 29, 2011, 8:25pm
2
Show us it?
i added the htaccess to my root
Is Apache’s mod_rewrite enabled?
i created the ActiveRecords.php in my components directory
I didn’t get this step…
foe_1
(foe#1)
January 30, 2011, 2:52am
3
Gerd, with the information your have provided it is difficult to help you.
r4nd4ll
(Fearvise)
January 30, 2011, 9:29am
4
Maybe you forgot add ‘urlFormat’=>‘path’ to your urlManager configuration?
http://www.yiiframework.com/doc/guide/1.1/en/topics.url
nbgerd
(Gerd)
February 3, 2011, 1:29am
5
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>',
),
),
zaccaria
(Matteo Falsitta)
February 3, 2011, 7:05am
6
Are you sure that this urlManager is in the components section of configuration?
The configuration as it is should work.
Rupert
(Ricard Buveur)
February 3, 2011, 8:41am
7
Gerd,
I think you should try to give us a copy of:
a) your .htaccess file containing the mod rewrite
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.