2014-04-25 107 views
0
http:/site_name/fanpage/profile/[string]/[num]/listensong/audio/[encoded id] 

我想將它更改爲:通過笨路線變更網址

http:/site_name/[string]/[num]/listensong/audio/[encoded id] 

。這個URL是通過CodeIgniter中的url庫生成的,我想更改它。

+0

http://ellislab.com/codeigniter/user-guide/general/routing.html有你需要爲實現這一目標的信息。 – Skewled

回答

0

Using the routing library:

// add to application/config/routes.php 
$route['products/(\w+)/(\d+)/listensong/audio/(\w+)'] = "fanpage/profile/$1/$2/listensong/audio/$3"; 
+0

非常感謝你cwallen它確實有效。如果我想要完全相反,我必須寫的意思是將第二個url更改爲第一個url – user3574225