?
Solved

Consistent relative path to root folders (wwwroot\webapp = 'localhost')

Posted on 2003-03-31
4
Medium Priority
?
755 Views
Last Modified: 2012-09-27
I wonder if i'm asking the impossible.

My local root folder is "C:\Inetpub\wwwroot\webapp" and it has an "\images" subfolder. On the remote server this folder will be www.webapp.co.uk/images so my code refers to "/images/pic.jpg". This doesn't work my IIS because it's looking for "http://localhost/images/pic.jpg" instead of http://localhost/webapp/images/pic.jpg. How can I get 'localhost' to refer to 'wwwroot\webapp'.

Many thanks

Fas
0
Comment
Question by:RasFas
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 9

Accepted Solution

by:
fz2hqs earned 300 total points
ID: 8244146
Go into the IIS MMC, get the properties of the website. Navigte to the tab labelled home directory adjust the path from C:\Inetpub\wwwroot to C:\Inetpub\wwwroot\webapp

-Stuart
0
 
LVL 3

Expert Comment

by:TSellers
ID: 8248388
You would create a virtual directory in IIS called 'images':

Click Start, point to Programs, click to select Administrative Tools, and then click Internet Services Manager.
Expand the server name.
In the left pane, right-click Default Web Site, point to New, and then click Virtual Directory.
In the first screen of the Virtual Directory Creation Wizard, type an alias, or name, for the virtual directory (such as 'images'), and then click Next.
In the second screen, click Browse. Locate the content folder that you created to hold the images. Click Next.
In the third screen, click to select Read and Run scripts (such as ASP). Make sure that the other check boxes are cleared. Click Finish to complete the wizard.
On the Virtual Directory tab, make sure that the virtual directory name is listed in the Application Name box under Application Settings. If it is not, click Create. Note that the application name does not have to match the virtual directory alias.
Close the Properties dialog box.
0
 

Author Comment

by:RasFas
ID: 8254341
Thanx Stuart. That's done the trick. Phew! Saved me a lot of work.

Fas
0
 

Author Comment

by:RasFas
ID: 8254355
Marvellous!!
0

Featured Post

Will your db performance match your db growth?

In Percona’s white paper “Performance at Scale: Keeping Your Database on Its Toes,” we take a high-level approach to what you need to think about when planning for database scalability.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you are a web developer, you would be aware of the <iframe> tag in HTML. The <iframe> stands for inline frame and is used to embed another document within the current HTML document. The embedded document could be even another website.
As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Suggested Courses

801 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question