17 Replies Latest reply on Apr 11, 2017 11:46 AM by Nancy OShea

    How to make paths recognize local site root?

    abeall Level 3
      I don't use Dreamweaver a whole lot (mostly just a designer) but I thought for sure that Dreamweaver was able to recognize absolute paths? For some reason it's not working. I have a site set up and the "Local root folder" set to a location on my harddrive, but the images and CSS link only shows up in Dreamweaver if I use relative paths. For instance, if I use "img/enacct.gif" everything works fine, but if I use "/img/enacct.gif" I get a broken image. The Files panel shows the correct site root folder. What am I missing?
        • 1. Re: How to make paths recognize local site root?
          Level 7
          when and where is it not working?

          On a guess- is it during an F12 Preview in Browser?

          If yes- go into dw preferences->Preview in Browser and checkmark "preview
          using temp files" so dw can make a temp page and convert the site root
          relative paths to document relative so they work off the hard drive.

          Otherwise, install a local testing server, and set up a virtual domain so
          that the site root relative paths will mean something-

          viewing a page directly from your hard drive, the /img/file.jpg path means
          "go to root level of the hard drive", not the defined root level of this web
          Adobe Community Expert, dreamweaver


          • 2. Re: How to make paths recognize local site root?
            abeall Level 3
            Thanks Alan,

            Sorry, this is just in Design view (or Live View.) It's also the same in Preview in Browser with or without "preview using temp files" as well, though my real concern is in the Design view.

            Here are a few more details:

            - Looking at some of my other sites I set up, site absolute paths work fine. Something is amiss with just this site.

            - The local site folder contains one space in one of the directory names. Could that be an issue?

            - If I open an HTML file with a CSS <link> it shows the name "styles.css" at the top under the tabs (new CS4 feature I think), but when I click it, it says "'styles.css' cannot be found. If the file exists on the server, use the Files panel to get the file from the server."

            - To give a precise example, this works:
            <link href="styles.css" rel="stylesheet" type="text/css" />
            While this does not:
            <link href="/styles.css" rel="stylesheet" type="text/css" />

            - It works fine on the remote server.

            - Here's a snapshot of my Files panel:
            The selected file shown is indeed the file where the above CSS <link> example is from.

            - This is a site that was defined in CS3. It behaves the same (broken site-root links) in CS3 and CS4.
            • 4. Re: How to make paths recognize local site root?
              Level 7

              > Any ideas?

              Where and when are the images not showing up?

              In dw design view?

              In F12 preview in browser?

              Or on the live remote server?

              Is the site defined to the correct folder level so that site root relative
              paths are correct?

              URL address to actual page pls.

              code that doesn't work:

              what the code should be to work:

              Adobe Community Expert, dreamweaver


              • 5. Re: How to make paths recognize local site root?
                Simmons Buntin Level 1

                I have the same problem on multiple sites.  I use site root-based links (ex., /eller_styles.css or /includes/nav.htm), but while the paths are just fine -- and show up just fine in design mode in CS3 -- they are not working for images or style sheets in Dreamweaver CS4 either for me or for one of my clients.  This is clearly a CS4 problem.  Is there a way to reset site parameters or paths to fix?  I've had no luck so far and the problem has prompted me to stop using CS4 and return to CS3.  But my client doesn't have that opportunity.

                • 6. Re: How to make paths recognize local site root?
                  Simmons Buntin Level 1

                  By the way, for clarification this is in CS4 design mode (not preview in browser, etc.).  If the page is put to the remote server, it looks/works just fine.  But in design mode it's a mess -- unworkable, really:




                  So far this happens on PC running CS4 on Vista and Windows XP.

                  • 7. Re: How to make paths recognize local site root?
                    Simmons Buntin Level 1

                    I did find this possible fix, but haven't had the chance to try it yet (and it doesn't seem to address images, which likewise aren't rendering in design view but the links are just fine:



                    • 8. Re: How to make paths recognize local site root?
                      Simmons Buntin Level 1

                      Well, my client just tried that and it didn't work (everything shows properly in Style Rendering as it should).  Now, the site shows in design mode on another computer (both running XP).  On my computer at work (Vista) this happened on a new site I created from an existing one that works just fine in CS4 design mode.  I duplicated the site using DW then edited to change source file locations, etc.  Again, every link is good: it all works online, but just not in design mode.

                      • 9. Re: How to make paths recognize local site root?
                        machrf Level 1


                        ******************* PROBLEM FIXED  *********************************************


                        This was certainly the oddest problem I have encountered although fairly easy to find a fix for. It only took me 6 hours to track it down. HA, Thanks Microsoft.


                        This does appear to be a CS4 or Dreamweaver issue if you have not installed a site on your local machine before this. Who would have thought that IIS would not work entirely on install. Well MS is beginning to install less features upon install and of course those are the features you need most. Why on earth would you need CSS files to work.


                        The problem is that Dreamwever does not have control over what MS and IIS does. The reference above referring to the check mark, Preview using temporary files is to Adobes credit, in allowing us to see the final result even if we dont trust what we see. Normally in the past, if you yourself have not made mistake in the link or code on your web page, it has been the application messing up the path in one way or another. I have seen funky things even though you have all the settings correct since ID4. (DW Inter Dev 4.) This is one time where it is not the applications fault.


                        IIS does not instal the feature that allows you to use CSS style sheets.


                        There is a fix both for Vista and Server 2008. I can not find the page again that tells of server 2008 but the link below states the fix for Vista.


                        Basically you have to go to your control panel,


                        Programs and Features

                        on the right click on Turn Windows Features on or off..... wait for it to fill

                        expand "Internet Information Services"

                        expand "World Wide WEb Services"

                        expand "Common Http Features"

                        Put a check mark in Static content.


                        Press ok and it will instal the capability for Cascading Style sheets to work on your local machine for your browsers.


                        Ok I can not find my original MSDN Microsoft site but I can post this link here.

                        http://gurustop.net/blog/2009/10/12/funny-problem-windows-7-iis-7-5-images-css-not-showing /






                        ****************************ORIGINAL POST **************************************

                        Design view in DW shows the CSS styles.


                        with the temp files checked for browse in (tested with firefox and IE)


                        HTM did not show the css styles

                        ASP did show the css styles.


                        With the temp files unchecked


                        IIS shows a blank page for HTM

                        IIS shows the text but no CSS Style settings.


                        Near the top it says a fix for this is to install a web server, as noted I have IIS on a Vista Machine.


                        This is on a Vista Machine and DW CS4.


                        Going to the site via IE using my local IIS server I do not get the CSS viewable.


                        Since making this post I have CS4 installed on an XP machine and the page previews and shows properly in XP local IIS. There is no problem at all in my pages at all in firefox and ie.I think this may be a Microsoft problem and we see this as a result in CS4 browse in feature. If IE does not show the page properly outside of DW I think DW problem is just that IIS is not working properly with any browser.

                        • 10. Re: How to make paths recognize local site root?
                          psdasap Level 1

                          Unfortunately, not solved for me. I have a similar problem. I can usually see the "Source Code" and js. .php and .css files associated with the file I am working on directly about the "Code", "Split", and "Design" buttons. However, for some reason I can only see the associated files if they have relative links. As soon as I place a "/" before styles.css it disappears form the list. Everything still shows up correctly in design view, but I just can't seem to see the file "styles.css" in the list.


                          I believe this occured when I accidentlayy clicked something in the "Open File" window toward the bottom. I have gone into the site settings the make sure that "Links relative to:" is set to "Document", but I still get the problem.


                          Any ideas?

                          • 11. Re: How to make paths recognize local site root?
                            bregent Most Valuable Participant

                            >However, for some reason I can only see the associated files if they have relative links


                            First, to clarify some terminolgy - when you add slash to the path, it is still a relative link; it's a site root relative link as opposed to document relative. These are  not absolute links.


                            Where is your styles.css located in your site? Where is the document you are working on located?


                            Also, it's usually best to start a new thread rather than reviving one that's 4 years old.

                            • 12. Re: How to make paths recognize local site root?
                              psdasap Level 1

                              The styles.css file is located at the root of the site with the page calling it. I am using Dreamweaver CS5. I switched to my CS6 and it works fine. However, I don't like to use CS6 as it runs slower on the computer that I am using. I have gone so as to delete the in managee sites and recreate it. I have compared the preferences as well as all of the site definitions between both versions of Dreamweaver and everything looks the same, yet I get the same problem. I think it might be time to reset Dreamweaver settings, but I can't seem to remember the keys I need to hold down upon restarting.

                              • 13. Re: How to make paths recognize local site root?
                                bregent Most Valuable Participant

                                Have you tried clearing the site cache? I would think that deleting and recreating the site would effectively do that, but try clearing it anyway.

                                • 14. Re: How to make paths recognize local site root?
                                  psdasap Level 1

                                  How do you clear Dreamweaver's Cache on a Mac?

                                  • 16. Re: How to make paths recognize local site root?
                                    GrantSRobertson Level 1

                                    I know this question is old but I will put in my two cents, just in case it helps someone else.


                                    What caused this to happen to me was that I had the "Web URL" field set wrong in the server settings dialog. In Dreamweaver CS6: { Site / Manage Sites ; (Select your site.) ; [Edit ... ] (the pencil button) ; <Servers> ; (Select your server.) ; [Edit ... ] (the pencil button) ; <Basic> ; Web URL: }


                                    I had originally set this up to include the /public_html/ folder that my hosting provider serves my site from. I did this before I had the custom domain name set up, so the Web URL was the URL required to get to my account via that hosting provider's domain name. And this worked just fine (both over the internet and in the Display view in Dreamweaver) until the DNS records for my custom domain name propagated through the internets. However, after the DNS records propagated, the old URL no longer worked, so I had to change my Web URL setting to reflect my custom domain name. I had assumed that I should just leave the /public_html/ in the path for the Web URL field. I was wrong. I changed my Web URL setting to just be http://mycustomdomain.net and Dreamweaver started displaying my site correctly in Display View.

                                    • 17. Re: How to make paths recognize local site root?
                                      Nancy OShea Adobe Community Professional & MVP

                                      Put another way, with  screenshot.