2

I'm still fairly new to IIS coming from an Apache background so please bear with me. I have setup a virtual directory on our hosting space for one of our clients. My aim is to make it so that we have a virtual directory for each client that is password protected and that our core site simply provides a list of the available sites to preview. My structure therefore is as follows:

www.domain.com (root)
www.domain.com/websiteone/ (virtual directory)
www.domain.com/websitetwo/ (virtual directory)

My problem is that links in "websiteone" that use "/" are resolving to www.domain.com/ rather than to www.domain.com/websiteone/

How do I get around this? Ideally if you could provide an example that uses the Plesk control panel that would be ideal as this is all our hosting provider provides us with.

Any help would be greatly appreciated.

HopelessN00b
  • 53,795
  • 33
  • 135
  • 209
jezzipin
  • 121
  • 4
  • I don't think there is a way with static content. Different application frameworks will expand `"~/"` to the root of the application but that doesn't work in static environment. – squillman Oct 09 '14 at 14:05
  • I'm using Umbraco and that enters "/" by default so I think i'm just going to have to abandon using virtual directorys. IIS really is rubbish :-( – jezzipin Oct 09 '14 at 14:10
  • Do you want the "/websiteone/" to actually be a part of the URL? – squillman Oct 09 '14 at 14:18
  • Well ideally the user will access their site via www.domain.com/websiteone/ this directory will then be passworded so that only they can view it. I dont really care what the actual url ends up looking like in the end – jezzipin Oct 09 '14 at 14:19
  • Ok. If you have the option through your hosting, separate web sites per customer is a cleaner way of doing things. – squillman Oct 09 '14 at 14:20
  • [Administration panels are off topic](http://serverfault.com/help/on-topic). [Even the presence of an administration panel on a system,](http://meta.serverfault.com/q/6538/118258) because they [take over the systems in strange and non-standard ways, making it difficult or even impossible for actual system administrators to manage the servers normally](http://meta.serverfault.com/a/3924/118258), and tend to indicate low-quality questions from *users* with insufficient knowledge for this site. – HopelessN00b Feb 25 '15 at 07:56

1 Answers1

0

Please add this right after the <head>:

<base href="//www.domain.com/websiteone/">

kazy
  • 271
  • 1
  • 8