ASP includes and IIS virtual domains

Results 1 to 2 of 2

Thread: ASP includes and IIS virtual domains

  1. #1
    Mike Papciak Guest

    Default ASP includes and IIS virtual domains

    We&#039re running IIS4/NT4, and we use includes a lot for, among other things, navigation bars on our site. For example, we&#039ve got one header navbar for the whole enchilada. The header inc file sits in the server&#039s root directory, and we call it like this:<BR><BR>&#060;!--#include virtual="/"--&#062;<BR><BR>This works fine much of the time, of course. For instance, if all the pages in our "clients" dir want to call that include, the above line of code works great, as long as we send you to the pages in our clients dir using a "normal" domain name like:<BR><BR><BR><BR>But we&#039ve got some parts of our site that utilize virtual domain names which we&#039ve set up for them in IIS. (I hope I have that term right; I&#039m always a little confused between Microsoft&#039s virtual site, virtual server, etc.) So let&#039s say instead of the URL above, we want to use this virtual domain name:<BR><BR><BR><BR>This confuses IIS when it&#039s time to go fetch those include files. To enable the virtual domain name, we had to tell IIS that if it encounters the virtual domain name, use the folder as the root instead of the server&#039s true root, and start hunting for the file there. Of course it won&#039t find it, because is in the server&#039s true root, not the faux root specified in the virtual site.<BR><BR>Wow, hope this makes sense.<BR><BR>So are we the only people on the planet doing things so hare-brained? Of course an inelegant workaround is to make another file and drop it into the /clients/ dir, but that kind of diminishes the value of using includes in the first place -- namely, that you can point all your pages at ONE include file. What would be perfect, of course, would be able to use absolute paths to include files, but ya can&#039t. Other advice most appreciated.<BR><BR>Swag from our organization if you can help.<BR><BR>I&#039ve also posted this to 4guys&#039 IIS forum.<BR><BR>Thanks and regards,<BR>Mike Papciak<BR>SF CA USA

  2. #2
    Join Date
    Dec 1969

    Default RE: ASP includes and IIS virtual domains

    you can use <BR>&#060;!--#include file=""--&#062;<BR><BR><BR>(i think. I&#039ve seen it done anyway, whether it worked or not is another matter. never tried)<BR><BR>j

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts