URL standard of Yii is : http://www.example.com/index.php?r=watch
Can I change this URL to `http://www.example.com/watch?v=6Pddo6kCxvM
(it's same youtube url)
Asked
Active
Viewed 764 times
1

Huy Tran
- 4,371
- 10
- 34
- 38
2 Answers
0
You would need to look into using mod_rewrite
in your .htaccess
file for that.

andy
- 2,369
- 2
- 31
- 50
-
Are you aware that in frameworks everything is routed to `index.php` and from there internal routing is used? – Dejan Marjanović Aug 29 '12 at 10:36
-
Yes I am. I haven't used Yii but I have used various MVC frameworks (and made one.) This change can be made with mod rewrite. – andy Aug 29 '12 at 10:38
-
I haven't used it either... and no. Or Yii sucks. – Dejan Marjanović Aug 29 '12 at 10:42
0
Yes. In addition to using .htaccess/mod_rewrite for getting the webserver to invoke the proper script, you should also look into configuring the URL manager. It's covered in the Special Topics: URL Management

karmakaze
- 34,689
- 1
- 30
- 32