Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SSI HELP needed

Status
Not open for further replies.

egims

Technical User
Jun 5, 2001
96
0
0
US
I have include files located on the root directory which are being successfully used by .shtml pages also in the root directory. However I have one .shtml page which must be located in a password protected sub directory that also uses the same include files. On that page I can change the path to the include file so that the page finds the include file, but the include file itself can not find the graphic images contained in it because the paths to these images are now different - since the page using it is in a sub directory.

I have tried <!--#include virtual=&quot;/header.inc&quot; --> for example. Text in the include file displays fine, but the include file displays no graphics. If I change the paths to images indicated in the include file so that they display for the .shtml page in the sub directory, the graphics no longer display for all the other pages.

HELP

Is there any way to fix this problem?

Your answer would be MUCH appreciated.
 
Hey egims,
When I deal with Dreamweaver and I need to change a file's image paths due to a subfolder, I let Dreamweaver do it for me. You have to have a Site Defined to do this. Go to Site>Define Sites if you have not already done this and enter in the appropriate info. Once you are in your site, create the password page within the same directory as the other pages so the images show up fine, then after it is working transfer the file to the subfolder within Dreamweaver, not through your computer. Go to Site>Files. Drag the File to the Subfolder. Dreamweaver then prompts you by asking if you want to update the appropriate files. Click Yes.

I don't work with include files much so this is just a guess as to whether Dreamweaver will be able to make necessary update. It works fine when dealing strictly with images etc. Hope this helps. Good Luck.
Tim
 
Thanks TJARON.

The current problem seems to be not that the .shtml file in the sub directory can't find the include file, but that the include file can no longer find the images in it, after it is loaded.

I could, as you say, use Dreamweaver to correct the paths in the include file so that it could find the images, but the problem then is that the correction causes the include file to once again not be able to find images when it is being called by .shtml files on the root directory.

Thanks for the thoughts, but it appears I still need a solution.
 
Hey egims,
posted your question around to try to help, this was only response. Maybe it will help.

have you tried <!--#include file=&quot;/path/to/my/graphics/graphic.gif&quot;--> Do a PWD to get the real path... ie: /home/user/directory/subdirectory/



Just a thought- I usually use include file instead of include virtual. I know exec cgi works fine with the paths so I don't see why include file wouldn't...
 
Another response:

In your include file, have the path to the images from root. For instance, if it's currently <img src=images/graphic.gif> change it to <img src=/images/graphic.gif>. The images will work no matter what directory the file is called from.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top