views:

45

answers:

2

Say I have a directory structure like so:

/public
/public/company
/public/globals
/public/globals/images
/public/jobs
/public/jobs/it
... etc.

What I would like to do is to be able to configure an IIS Site to load from /public/company when visiting the domain root. I know I can change the site to /public/company, but if I do that, I can't seem to reference the /public/globals directory to obtain images, videos, and other items used across the site.

The other problem is accessing /public/jobs with a domain/jobs url... although I suppose virtual directories can help there, but then I would assume that I would still run into problems trying to access /public/globals for images and other things.

Any ideas? Am I not doing this right? I'm used to using Apache... obviously a very different environment...

A: 

Create a Default.aspx page in the root, and on that page, run this:

Response.Redirect("~/public/company/destination.aspx");
Josh Pearce
Hi Josh, thanks for the reply but this will not work. I don't want search engines getting the wrong idea, and using http://domain will show http://domain/company, which is not what I am looking to do.
Cypher
A: 

I seemed to have found the answer. I set the default path of the Site to /public/company, and created a Virtual Directory called "globals" that points to /public/globals. Now I can reference images via the Virtual Directory like so:

<img src="/globals/images/awesome.png" />

I suppose I just need to create virtual directories for everything under the sun for the rest of the site then.

Cypher