views:

140

answers:

1

If I want to use subdomains for images, stylesheets and javascripts on my website (like img.domain.com), how would you set it up in Visual Studio 2008 so I am able to debug the website on my local computer?

Is it possible ? and how ?

The webdev server always uses localhost:port, is there anyway to map etc. img.localhost:port to a specific folder in a project ?

A: 

Use %systemroot%\system32\drivers\etc\hosts and map and arbitrary domain name to 127.0.0.1 (i.e. localhost). Then, set your debug action to open a custom URL.

(edit in response to comments) If you need to have different directory structures, you'll need to complicate the setup a bit. I'd try setting up IIS with a virtual directory pointed at the same content, especially if it's static (like images).

DDaviesBrackett
Thanks for your reply. I dont understand how i can use this to make it possible to map static.localhost to the /content/ folder of my website, soo my urls can be static.localhost/img/mymimage.jpg like on the production server.
MartinF
where the /img/ folder is a folder inside the /content/ folder.
MartinF
good point - editing to expand on the answer.
DDaviesBrackett