Lets say that I want to show http://example.com/topic/view/topicname/thenameofthetopic direclty as http://example.com/thenameofthetopic
So I have achieved that when entering http:// example.com/thenameofthetopic , it redirects you to the controller/action properly, and the website shows what I want to show, the problem is that of course, the URL changed, and I want it to maintain the format http://example.com/thenameofthetopic
Is that possible whitout touching the htaccess file? Just configuring it with yii
How should I do that?
Exactly your case is:
You will get the name of topic in Yii::app()->request->getQuery(‘name_of_topic’);
htaccess is Yii – classic, the must be present:
I would advice you to do another way.
So topic link will be http://www.example.com/t/name_of_topic.
This will allow you to use “a//” for articles etc.
One more thing. Read this article to find much interesting things http://www.yiiframework.com/doc/guide/1.1/en/topics.url