Dynamic and static url with php and mod_rewrite

Hi everyone,

I need some help … Right now, i have a link which is dynamic, like so


I want to convert it like so


I have use mod_rewrite to convert it, but now i have to convert them in my pages also since stuff are coming from database.

Can someone help me? I have no idea how to achieve this