Virtual Directories

  • Thread starter Thread starter Mr Struggler
  • Start date Start date
M

Mr Struggler

Hi Folks,

OK, I have a IIS Server running in my house and as I have a static IP
Address I host a web site from it. I have two virtual mapping to the
directory in where it is stored. so www.mydomain.net or mydomain.net will
arrive at the same web site wwwroot\myWebsite

This works fine except that I am using a javascript menu system. The problem
here is that when I build and launch the site from my PC, I get

localhost/myWebsite/default.aspx

When I visit my site server i of course get

www.myDomain.net/default.aspx

This makes the subdirectory invisible to the user which is what I want.

The problem is I need to apply the same redirection to my local machine
otherwise its expecting to see code either with or without the \myWebsite
depending on where the application is run from.

Cheers
 
You need a site at root. THis means binding an additional IP address to a
card in the machine and making a new website instead of a virtual directory.
Then, everything will map the same way.

The other way around this is adding the dynamic bits that make the sites
different by embedding in the JavaScript at runtime.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
http://gregorybeamer.spaces.live.com

*************************************************
Think outside of the box!
*************************************************
 
When you set up the local virtual site on your IIS, it should be to folder:

"/myWebsite"

when you launch a page it should return

"localhost/default.aspx"
 
Thanks for the advice. I took it and re-wrote the javascript menu to
compensate for the two environments.

Regards
 
Back
Top