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
  Ads  
Webhost4Life - $4.95 Windows Hosting
 


  Sponsors  

Meet Our Sponsors

CrystalTech Web Hosting™
Webhost4life, specialists in DNN hosting
Mad Development is a full service interactive agency focusing on the merge of design, technology, e-commerce, and affiliate marketing by providing total website solutions.
AspDotNetStoreFront - E-Commerce by Design - The Leading ASP.NET shopping cart platform for developers!
SteadyRain
DataSprings - Great Ideas. Always Flowing.
 


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 1: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 2: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 2: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.

 


DNNCovered.com - Your Offshore Dotnetnuke Partner
Dnncovered.com is the only Dotnetnuke offshore outsourcing center specializes in DNN skinning and module development with lowest pricing and quality service. Our staff is dedicated to websites based on DNN and our graphic designers are creative and imaginative well enough to provide customers the complete set of skinning solutions and packages
www.dnncovered.com
PointClick.Net DNN Solutions
DotNetNuke Hosting Platform for Business and personal use.
PointClick.Net Hosted Solutions
Advanced Web Portals by Infoscaler
Infoscaler is a California based company that provides advanced Web Portals, E-commerce Sites, Database Applications and Intranet Solutions on the DotNetNuke and Microsoft.NET platforms.
www.infoscaler.com

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