First RoR Aplication - images/css paths

I routed the page

www.site.com to a controller "welcome"

config/routes.rb: map.root :controller => "welcome"

after this action

the home page

http://www.site.com ho reads the action index works fine

but if I call

http://www.site.com/welcome/

the links fo the images goes wrong, the same if a call othes action

http://www.site.com/welcome/demos

can you help me?

How are you linking to the images?

In html

http://www.site.com/welcome/
works

<img src="../img/head_player.jpg" width="275" height="39" />

http://www.site.com/
works
<img src="img/head_player.jpg" width="275" height="39" />

Try

Colin

Yes it works, but is not xhtml compliant, i am looking for a routing
solution?

Sergio

In what way is it not xhtml compliant?

Yes you are right, I make a mistake reading.
Sergio

a good way to avoid such path issues is to use the image_tag
helper method:

image_tag("icon") # => <img src="/images/icon" alt="Icon" />