Change structure url of Yii Framework

775 Views Asked by At

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

2

There are 2 best solutions below

3
On

You would need to look into using mod_rewrite in your .htaccess file for that.

Here you go

0
On

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