$text = "eee background: url(img/back.gif) rrr background: url(http://img.com/back.gif)";
echo
preg_replace('/url\([^http](.*?)\)/', "url(../$1)", $text);
bu tarz bir şey olmalı. bu kodda enteresan bir şekilde ilk harfi almıyor
url(../mg/back.gif) böyle oluyor