urlManager makes all images disappear when creating a rule

I tried to implement urlManager Component, now my problem is that whenever I call this all my images on the page don’t show, If I disable it it shows again

Without rewrite my URL looks as follows


with urlManager it looks like this below, whenever this is called all the images on my page disappear :frowning:


My urlManager rules








I’m completely lost, since images disappear, but cid can be read. Any help I would appreciatte. Thanks

Is the syntax error in your rule a copy/paste issue?


If your image looks like

<img src="img/button.gif" />

and your page URI was /gallery/category/1, your image will get requested from /gallery/category/1/img/button.gif which is obviously not what you want. To avoid that, you need to supply an absolute URI to your image (’/’ + baseUrl + image path). You can use the bu() method from here:


My image tags usually look like this:

<img src="<?php bu('img/button.gif') ?>" />

Thanks, that worked