How To Change Url?

i make 3 crud and fetch all three crud data on my my sigle page site/index.php page successfully in these crud i fetch images from database as well .problem is this now when i click on these images which are CHTML::images its called url (index.php?r=site/view&id=6) but this image will work on ((index.php?r=National/view&id=6) )

i want to call index.php?r=National/view&id=6) for one crud

Also when i click on 2 image it should call


please help

Thank in Advance

If you just want to change text in the url you can do this:

$newUrl = str_replace("r=site","r=National",$oldUrl);

Thanks for reply issue solved

I passed URL in array and its work fine

Like array (“controlller/view&id=$data->I’d”),