Hi,

I'm giving pretty URL's a shot, but it's giving me headaches already.

The setup is .htaccess with the following content:
Code:
   RewriteCond %{SCRIPT_FILENAME} !-d
   RewriteCond %{SCRIPT_FILENAME} !-f
   RewriteRule ^([^\.]+)$ index.php?file=$1 [NC,L]
And in PHP retrieving $_GET['file'].

It kinda works, but the problem I'm facing is that when the path is deeper than 0 (e.g. /foo/bar) images and CSS don't work because the paths are incorrect (like img/foo.png).
Now rather than hardcoding in the paths to the images and css, I was wondering if there is a way of tweaking the .htaccess a little bit more to fix that.
Any other solutions would also be appreciated.

Thanks