Using base_url() in image paths without using PHP?
in your .htaccess file, you could try something like:

RewriteEngine on


(in case it is not already turned on)

RewriteCond %{HTTP_HOST} ^example\.com$
RewriteRule (.*) http://www.example.com/$1 [R=301,L]
RewriteRule ^$ subfolder [L]


(where in this case 'subfolder' represents the address of the installation)

This should create a system based, base url, rather than a php based url - so relative paths should work.