Small width layout Medium width layout Maximum width layout Small text Medium text Large text
     Search
Downloads Downloads Directory Directory Forums Forums Forge Forge Blogs Blogs        Marketplace Marketplace Careers Program Careers
Community › Forums Register  |  

PortalWebHosting
  Need Help?  
Professional technical support for DotNetNuke is available from DotNetNuke Corporation.
 


  Ads  
r2i.ntegrated
 


  Sponsors  

Meet Our Sponsors

Red-Gate Software
MaximumASP
SourceGear - Tools for Developers
.: CounterSoft :.
telerik
ExactTarget email software solutions
 


DotNetNuke Forums
 
  Forum  General DotNetN...  Configure It! (...  Not Resolving Relative File Paths In HTML After Website Copy/Restore
Previous Previous
 
Next Next
New Post 12/12/2006 12:35 PM
User is offline Stefan
24 posts
10th Ranked


Not Resolving Relative File Paths In HTML After Website Copy/Restore 

There are several good posts that describe in detail how to copy a hosted DNN website to your local computer.  One of the better posts is at

http://www.dnncreative.com/Forum/tabid/88/view/topic/forumid/4/postid/1919/Default.aspx

Note that the first step in all these procedures is to go to Admin / Site Settings /Portal Aliases
and add a New HTTP Alias for the address that you wish to use for your locahost installation:

    for example, localhost/yourdirname

 The main problem with these approaches is that when the destination (copied) website is run in a development environment such as Visual Studio 2005, Visual Web Developer or even directly in IIS, all files referred by a relative path in HTML are not recognized. 

For example, assume that you want to copy a website that resides on a hosted web server to your local computer. This web server's files are stored in the /wwwroot directory on the web server and for consistency you would also copy all these files in a \wwwroot directory on your local computer. For convinience, all paths imbedded in HTML on the web server should be relative instead of absolute.  "/mypath/myfile.jpg"  would be a relative path whereas "http://mywebsite.com/mypath/myfile.jpg" is an absolute path. When testing the copied website, the easy way to check this problem is to look at your graphics files on the copied site.   If the files use relative paths, the graphics files are not displayed on any web page of the copied website.

When encoutering this error, the first place to check is the  PortalAlias.HTTPAlias column in the database.  The column should contain an entry for 

    localhost:9999/wwwroot where 9999 is the http port of the local host. 

This value is set in DNN using the Admin / Site Settings /Portal Aliases menu before the hosted web site is copied.

The next place to look would be the settings on the local web server.  From discussing this issue with other developers, the problem occurs on both the Visual Studio 2005 ASP.NET Development Web Server and IIS 6.   Both servers allow you to specify a Virtual Path and Root URL:

Virtual Path:  /wwwroot

Root URL:  http://localhost:9999/wwwroot

Changing either of these settings to Virtual Path:  / or Root URL:  http://localhost:9999/  does not resolve the problem.

At this point I am open to suggestions.

Thanks,

Stefan Pantu

Computer Software Connection, Inc.

southfloridakiteboarding.com

 
New Post 12/12/2006 1:25 PM
User is offline Jon
84 posts
10th Ranked


Re: Not Resolving Relative File Paths In HTML After Website Copy/Restore 
 "/mypath/myfile.jpg"  would be a relative path whereas
I don't know that I can solve your problem.  But I disagree with this statement.  "/mypath/myfile.jpg" is still an absolute path, indicating that the /mypath folder will be in the website's root folder.  However, "mypath/myfile.jpg" is a relative path, indicating that the mypath folder will be a subfolder under the current page's folder.
 
New Post 12/12/2006 1:43 PM
User is offline Stefan
24 posts
10th Ranked


Re: Not Resolving Relative File Paths In HTML After Website Copy/Restore 
 JonRobertson wrote
 "/mypath/myfile.jpg"  would be a relative path whereas

I don't know that I can solve your problem.  But I disagree with this statement.  "/mypath/myfile.jpg" is still an absolute path, indicating that the /mypath folder will be in the website's root folder.  However, "mypath/myfile.jpg" is a relative path, indicating that the mypath folder will be a subfolder under the current page's folder.

I see your point.  Instead of "/mypath/myfile.jpg" I should have used ".../mypath/myfile.jpg" in the text above.

I skewed the defenition of absolute and relative paths to conform to this problem.  Any path that is not prefixed with the server name (for example, ".../mypath/myfile.jpg") breaks in the copied web site.  I called this a relative path. 

Stefan

 
Previous Previous
 
Next Next
  Forum  General DotNetN...  Configure It! (...  Not Resolving Relative File Paths In HTML After Website Copy/Restore
 


Forum Policy

These Discussion Forums are dedicated to the discussion of the DotNetNuke Web Application Framework.

For the benefit of the community and to protect the integrity of the project, please observe the following posting guidelines:

1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DotNetNuke.
2. Discussion or promotion of DotNetNuke product releases under a different brand name are strictly prohibited.
3. No Flaming or Trolling.
4. No Profanity, Racism, or Prejudice.
5. Site Moderators have the final word on approving/removing a thread or post or comment.
6. English language posting only, please.

 


DotNetNuke Marketplace - Modules & Skins
The DotNetNuke Marketplace is the official e-commerce gateway for the DNN ecosystem. It's the place to buy and sell DotNetNuke modules, DotNetNuke skins, and other DNN offerings.
DotNetNuke Marketplace
ExactTarget Email Marketing Software and Solutions
ExactTarget delivers on-demand email software solutions for permission-based email marketing. ExactTarget offers solutions that meet the needs of all industry verticals and all size organizations, including SMB, corporate divisions, not-for-profits, large retail/direct marketers, agencies and enterprises.
ExactTarget.com
Sunset Hill Solutions - Consulting and Development
We offer general DNN consulting services - including custom module development and commercial module integration/setup.
www.sunsethill.ca

DotNetNuke Corporation   Terms Of Use  Privacy Statement
DotNetNuke®, DNN®, and the DotNetNuke logo are trademarks of DotNetNuke Corporation
Hosted by MaximumASP