So basically I am using a drupal multi-site. Structure is as follows:
mywebsite.com: -- public_html/sites/default/
sub.mywebsite.com: -- public_html/sites/sub.mywebsite.com/
Works just fine(via settings.php), but the problem comes when theming. In order to reference valid image files, I must use drupal_get_path('theme','mythemefolder')
And due to having "pretty urls" activated, I must use the following code to reference the image files:
$uri=$_SERVER["REQUEST_URI"];
$path=drupal_get_path('theme','mythemefolder')."/";
$real_prefix=$base_path; // global from drupal, equates to "/" as drupal resides in public_html folder.
$count=substr_count($uri,"/");
for ($i=0;$i<$count;$i++) $real_prefix.="../";
In this way, I can do the following:
<script type="text/css">
#borderclass {
background-image: url('<?= $real_prefix.$path.'images/a_border_image.png'; ?>');
background-repeat: repeat-x;
vertical-align: top;
}
</script>
<div class="borderclass" width="10px" height="10px"><!-- my image border div --></div>
It would be much preferable to not have to do this. And just simply reference the local site folder...
So that instead, I could write via PHP referenced above:
<div style="background-image: url('<?= $path ?>images/a_border_image.png');"></div>
The resulting html should instead appear inside View Source, as:
<div style="background-image: url('themes/mythemefolder/images/a_border_image.png');"></div>
and Not:
<div style="background-image: url('sites/sub.mywebsite.com/themes/mythemefolder/images/a_border_image.png');"></div>
Is it possible to configure my server to do such a thing? Basically, I'd rather not have my clients even know that the "sites" directory exists on the server when using their own domain or subdomain. Let alone the above presented theming issue.