1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

Question about ASP includes

Discussion in 'Plesk for Windows - 8.x and Older' started by emsol, Sep 29, 2004.

  1. emsol

    emsol Guest

    0
     
    Hi,

    Scenario...

    Customer moves from a Windows server (running inspanel) to a plesk 7 Windows server and his site now wont work due to the paths being different.

    Reason seems to be related to his includes - previousley, the site was setup with "enable parent paths" and uses "include virtual" statements for all its include files.

    When trying to run the site on the Plesk server it comes up with errors that it cant find the files - even with "enable parent paths" set to on.

    One thing I notice about the old server in comparison with the plesk one is that the site was setup in IIS6 as a username rather than a domain name - I cant actually see in the site settings where the domain name itself is pointed at the local user folder.

    Should I get the customer to change all his include statements to "include file" instead - and use relative paths ? Or is there a simple way of making his virtual includes work ?

    I'm mostly a Linux person and still learning IIS so any help with this would be greatly appreciated.
     
  2. DigitalEmotions

    DigitalEmotions Guest

    0
     
    Enabling parent paths is disabled by default in IIS6 because it is a security risk. You are safer leaving it disabled.

    You can still use the "include virtual" when enable parents paths is switched off. But to load files from parent directories you need to include the absolute link from the root directory instead of the relative link.
     
  3. emsol

    emsol Guest

    0
     
    Do you mean the ftp root or the doc root ?
     
  4. DigitalEmotions

    DigitalEmotions Guest

    0
     
    The web site home directory. Httpdoc root.

    Eg. To include the file "www.domain.com/admin/inc/includefile.html" in the file "www.domain.com/admin/section/default.asp"

    include virtual="../inc/includefile.html" will not work without parent paths enabled, but include virtual="/admin/inc/includefile.html" will work.

    Basically you cant use the ".." to step back a directory, the file reference has to start from the home directory (httpdoc) with a "/".
     
  5. emsol

    emsol Guest

    0
     
    Thanks - that helped alot.
     
Loading...