Greenguy's Board

Greenguy's Board (http://www.greenguysboard.com/board/index.php)
-   Programming & Scripting (http://www.greenguysboard.com/board/forumdisplay.php?f=15)
-   -   SSI problem (http://www.greenguysboard.com/board/showthread.php?t=17552)

JanTM 2005-03-15 05:49 PM

SSI problem
 
Fiddling around with SSI I can't quite get it to work the way I want to.

Including files using

include virtual="file.html" or include virtual="/subdir/file.html" works just fine.
That is I can include files in the same directory or any subdirectory.

However... what I am trying to do is
include virtual="/../../anotherdomain.com/html/file.html"
And that doesn't work at all. In fact I can't seem to include any file in which the path to it involves going UP the directory strukture.

I have even tried a direct path like this
include virtual="/home/username/domain.com/html/file.html" - which doesn't work either. Anybody have any ideas... because the manuals I find online says it "should" be working |cry|

swedguy 2005-03-15 06:07 PM

"include virtual" goes from the root of the domain, for example:

http://domain.com/path1/something = virtual="/path1/something"

"include file" goes from current working directory

There's no way to include from outside the current domain, like /home/someotherdomain.com/....

JanTM 2005-03-15 06:12 PM

Ach... not the answer I was hoping for. But thanks for clearing that up anyways. Another approach in then needed.

swedguy 2005-03-15 06:16 PM

Hmmm, I just thought of couple of workarounds. You could try to include a PHP file that has this in it...



Then include it with


Or do it more versatile

In your html page:



in file.php:


In file.php you have to have some security measures so evil people can't include any kind of file on your server. I just made it simple, just so you get an idea how you can do it :)

JanTM 2005-03-15 06:31 PM

oh yes :)
That works like a charm. Thanks man :)

swedguy 2005-03-15 06:32 PM

np :)


All times are GMT -4. The time now is 08:27 AM.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
© Greenguy Marketing Inc