Multiple Domains

When I have multiple domains can I share files between them?

For example, I have images that I could use on two of the domains, I would rather not have two copies of the image on the server.

Can I create an 'images' folder under the root and use it for all the domains? How?

I also need to reference to files inside one of the domains for another domain. How do I do this?

Thanks,

Adam
 
Yash,

I tried it and it didn't work. My directories are setup like this.

Root
boyscoutstore.com
store
scripts
Inctemplate.asp
images
boyscoustore.gif

When I tried to add boyscoutstore.gif to my inctemplate.asp file it would show up. I had the image linked like this:

..\..\..\images\boyscoutstore.gif

When I loaded the page the image wouldn't show. If I right-clicked on the page the image properties showed as it would just be under the boyscoutstore domain.

Thanks for the help!

Adam
 
You won't be able to get into those directories because IIS will not serve them for security reasons.

i.e. if that was possible you could go downloading things out of your area

Also if you use a physical path in the <img> tag it will be the physical path of the client not the server, so that would not work
 
So the only thing I can do is have the image in multiple locations?

What if I need to link to a database outside of the domains?

Thanks for the help!

Adam
 
jegesmaci said:
So the only thing I can do is have the image in multiple locations?

What if I need to link to a database outside of the domains?

Thanks for the help!

Adam

Not at all.

For <img> tags, the client (visitor's browser) obtains and processes the resource. So, you could keep all the images within one domain and simply specify the entire url in pages in other domains:
<img src="myprimarydomain.com/images/myimage.jpg">
This is not the greatest solution, but it works.

For databases, your server-side script obtains and processes the resource. Therefore, you are opening the resource and can specify a path to the database:
DBPath="c:\hshome\myaccount\databases\mydb.mdb"
In fact, I currently have a subdomain for database updates that actually does the following:
DBPath="c:\hshome\myaccount\mydomain\databases\mydb.mdb"
It works fine.

riley
 
riley,

When you say this isn't the greatest solution, what is a better solution? I want to make sure my site is optimized.

Thanks,

Adam
 
If I've got you straight, I'm going to run into the same problem. Right now I've got 15 domains and 22 subdomains setup but they are all in seperate directories, i.e. 37 directories. I need them to all map to the same directory though.

How can I do this? I don't see any directory mappings in H-Sphere.

Yash? Anyone?
 
I am not much of an ASP coder at all but could one not use some server map pathing?
 
Stephen said:
I am not much of an ASP coder at all but could one not use some server map pathing?

This is possible, but it adds to the level of complexity, and thus, the probability that something will go wrong.

I really want to keep things as simple as possible, and as isolated from the developers as possible. They WILL screw things up if I give them the opportunity to do so. The only way to get around it is to have each domain and subdomain map to the same directory - as processed by IIS and not by ASP.dll or the ASP.NET dll, which would leave it up to developers that I absolutely don't trust.

Anyone know how to do this? Or should I just issue a ticket to get it done?
 
jegesmaci said:
riley,

When you say this isn't the greatest solution, what is a better solution? I want to make sure my site is optimized.

Thanks,

Adam

If IIS mapping were available to us, you might have a better solution. But, under the circumstances, I can't think of anything better.

riley
 
Back
Top