Hi i want to redirect my mobile users from desktop site. The mobile server is based on nginx and i am adding the rewrite rules: i have to add 50 rules and dont know any short cuts.. but the problem is the rule is not working with suffix. for example in my desktop site i have
http://www.example.com/watch/tv-commercial/aci-aerosol-hd/ http://www.example.com/category/tv-commercial/
http://www.example.com/category/music-video/
http://www.example.com/watch/music-video/aji-e-boshonte/
and i want to redirect
http://www.example.com/watch/tv-commercial/
this group to http://m.example.com/funny-clips
and this group to
http://www.example.com/category/music-video/
http://m.bongobd.com/full-movie-natok
if i write
location = /watch/tv-commercial/ {
return 301 /funny-clips;
}
it works but if it has "aji-e-boshonte"
its not working.
can anyone help? also I have multiple incoming rule to redirect one single route. for example/ tv/movie/comedy(with slug) to /funny-clips do i need to write every time the rule?