Subject: Path to Image Files
Prev Next
You are not authorized to post a reply.

AuthorMessages
Ed FrazierUser is Offline
Regular User
Regular User
Posts:56

04/02/2008 11:05 AM  

I have been developing DNN sites locally and then uploading to a remote host. The local sites are created in a sub-folder of wwwroot, as suggested in your tutorials.

When images or other files located in the portal root are inserted into the site, the path to the file includes the folder name of the DNN installation (/SunsetsWestInc/Portals/0/image.jpg). When these sites are moved to a remote host, all URLs to linked files are invalid because they still contain the local folder name. I've been having to modify each URL to remove the folder reference.

Is there something I can do with my local DNN instance (other than putting it in wwwroot) that will allow internal links to work after transfer to the remote host without having to edit every URL?

Thanks,
Ed

Mitchel SellersUser is Offline
Site Admin/Owner
Guru
Guru
Posts:6089

04/02/2008 11:11 AM  
Ed,

If you are looking at Text/HTML module content only I have a nifty tool (DNN Text/HTML Replacement Tool) that will fix all broken links when you go to production...

Otherwise the best way is to work with it on a root installation on your local machine, but that is sometimes very hard for people to setup thus why it isn't the process that is outlined in installation guides.

Also, if it is custom module content there are a few best practices that you can use in your module development to help prevent these types of issues, this includes using ResolveClientUrl and application root specific references to ensure that modules can function both on a virtual directory AND on a root installation.

-Mitchel Sellers
Microsoft C# MVP, MCITP
Director of Development
IowaComputerGurus Inc.

View Mitchel Sellers's profile on LinkedIn

For shared hosting I recommend PowerDNN

This site is hosted on a Dedicated Server from PowerDNN.com

To get Guaranteed DNN Support check out our affordable DNN Technical Support Programs
Ed FrazierUser is Offline
Regular User
Regular User
Posts:56

04/02/2008 11:28 AM  

Thanks Mitchel, I'll look into your tool solution since these, so far, have been issues with the Text/HTML module. (You really didn't think *I* was developing my own modules did you <img src=" border=0>  I'm sure those that know what they are doing will appreciate the tip though.

Ed

 
Mitchel SellersUser is Offline
Site Admin/Owner
Guru
Guru
Posts:6089

04/02/2008 11:48 AM  
Ed,

When using my tool....you will want to use the following values.

Look for: /dnn/ (Or whatever your directory is
Replace with: /

This is VERY important.....as other solutions will result in improper links later.

-Mitchel Sellers
Microsoft C# MVP, MCITP
Director of Development
IowaComputerGurus Inc.

View Mitchel Sellers's profile on LinkedIn

For shared hosting I recommend PowerDNN

This site is hosted on a Dedicated Server from PowerDNN.com

To get Guaranteed DNN Support check out our affordable DNN Technical Support Programs
You are not authorized to post a reply.
Forums >Development Discussion >DotNetNuke > Path to Image Files



ActiveForums 3.7