Greenguy's Board


Go Back   Greenguy's Board > Programming & Scripting
Register FAQ Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
Old 2008-07-22, 11:10 PM   #1
SheepGuy
It's the end of the world as we know it, and I feel fine
 
SheepGuy's Avatar
 
Join Date: Jul 2006
Location: Canada
Posts: 2,527
SSI question

I'm trying to throw some ads on the inside pages of some AVS sites.
I have a directory just under the root called "include" which has the ad, which is called "streamt.htm"
Where I want to put the ad is "www.domainname.com/smutsite/members/blah.htm"

The code I'm trying to call it up with is
<!--#include virtual="../include/streamt.htm" -->
I've also tried
<!--#include virtual="../../include/streamt.htm" -->
and neither work.

I know I'm probably missing something obvious, I've used SSI's a lot in the past with no problem. Any ideas as to where I'm fucking it up?
__________________
If the Environment was a bank, they would have saved it by now.
SheepGuy is offline   Reply With Quote
Old 2008-07-22, 11:19 PM   #2
cd34
a.k.a. Sparky
 
cd34's Avatar
 
Join Date: Sep 2004
Location: West Palm Beach, FL, USA
Posts: 2,396
typically, I find that

<!--#include virtual="/include/streamt.htm" -->

would work better.

Are you getting the dreaded, An error has occurred processing this directive?

If so, the file could be missing, it might not be readable by the server, the path could be wrong.

If you're not getting an error, check the source to see if the command is inside the html page -- if so, you may not have SSI parsing turned on for .htm pages (many servers don't parse .htm for SSI)

AddHandler server-parsed .htm .html

If it isn't already

If you're using apache 2.x (and you should be)

<FilesMatch "\.htm(l)?(\..+)?$">
SetOutputFilter INCLUDES
</FilesMatch>

If you have access to the raw apache logs, you might have better luck seeing the error message if none of the above helps.
__________________
SnapReplay.com a different way to share photos - iPhone & Android
cd34 is offline   Reply With Quote
Old 2008-07-23, 12:15 AM   #3
Maj. Stress
Progress rarely comes in buckets, it normally comes in teaspoons
 
Maj. Stress's Avatar
 
Join Date: Jun 2005
Location: Dark Side Of Naboo
Posts: 1,289
Sheep Guy,
I'm not 100% positive but I think the folder you are pulling the files from has to have a global alias.
I have one folder on each partition of my server that has such a folder with many sub folders that I pull all my images, movies and recip tables from.

I've never seen an ssi call with a ../ used before.

If all else fails you can probably get by with a php include using the absolute path to the file.
Maj. Stress is offline   Reply With Quote
Old 2008-07-23, 12:50 AM   #4
SheepGuy
It's the end of the world as we know it, and I feel fine
 
SheepGuy's Avatar
 
Join Date: Jul 2006
Location: Canada
Posts: 2,527
Thanks guys, just tried Sparky's code and still no luck. No error messages either and I'm on an Apache server, not sure what vintage though

http://www.eastcoastsluts.com/firstt...ong/gal02.html
is the page the call is on, at the bottom.

And I've just figured out that this works on my other domains, and for the 3 or 4 sites I want to add it to on the eastcoast domain if worse comes to worse I'll just paste it in.
I'm lost when it comes to servers so I'll run it by the guy who runs mine, gotta be something on that end I would think.

Thanks again!
__________________
If the Environment was a bank, they would have saved it by now.
SheepGuy is offline   Reply With Quote
Old 2008-07-23, 01:57 AM   #5
dunc
You can now put whatever you want in this space :)
 
dunc's Avatar
 
Join Date: Feb 2007
Location: Australia
Posts: 658
It looks like SSI isn't working either on that domain, or that file extension (.htm)

I don't think its a path problem

Time to contact the host...
dunc is offline   Reply With Quote
Old 2008-07-23, 09:52 AM   #6
cd34
a.k.a. Sparky
 
cd34's Avatar
 
Join Date: Sep 2004
Location: West Palm Beach, FL, USA
Posts: 2,396
Code:
<br><center><hr>
<!--#include virtual="/include/streamt.htm" -->

</body>
Well, the code itself is visible when you do view source.

Appears that you're on Apache 1.3.x

so, try putting an .htaccess with:

Code:
AddHandler server-parsed .htm .html
remove the .html at the end if you don't want to parse .html files -- or, if they are perhaps parsed by php.

When you do a View Source, if you can see the SSI as a comment, it means that the server isn't parsing the page.

Its not a global alias issue, as I can access the include from your web url at http://www.eastcoastsluts.com/include/streamt.htm, so, its just a matter of getting the server to parse SSI on .htm pages. The .htaccess above should do that. You can put the line above in any of your .htaccess files as long as it is above the directory that you want things parsed. You might put it in the .htaccess at the root of your site in case you have other mod_rewrites for hotlinking protection, etc.
__________________
SnapReplay.com a different way to share photos - iPhone & Android
cd34 is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 09:13 AM.


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