0
votes

I have created a module in PyroCMS like mymodule and create the front controller songs.

Now I want to set the my routing from

www.example.com/mymodule/songs to www.example.com/songs

Please help me.

2

2 Answers

1
votes

Haven't tested this but something like the following should work, assuming you have the URL schema www.example.com/mymodule/songs and www.example.com/mymodule/songs/song_id:

$route['songs'] = 'mymodule/songs';
$route['songs/(:any)'] = 'mymodule/songs/$1';
0
votes

Depending on your version you could use the routes module.

Something like: foo/(:any) => bar/baz