Brandon
06-19-2002, 07:13 PM
I made a webapge many many months ago, and it worked fine, and was pretty pimp IMO considering the limitations I had on how much "fun" I coul dhave w/ the page. The problem is, my host(who is good friends w/ the page owner) recently changed something in their servers that I cannot use my Server Side Includes anymore. I was using them to redisplay my top half of the code, and the bottom half of the code on every page. (basically, I have 2 .txt files that are used in every page to setup up the tables around the content.) What can I do now, w/out DRASTICALLY changing my whole code? First thing that came to mind was a bunch of document.write("") lines in a .js file, but that would be the WORST way to go! plz help me ppl :D!
The code I am using is:
<!--#include virtual="/sitewide/top.txt"-->
I have tried chmoding it to 777 and everything(that was what the host said the problem was)
I'd get a new host...seriously. SSI is a basic option, if they don't provide it, you're getting ripped.
Other than that, see if your page that is calling the SSI needs to be a certain extension (shtml as opposed to html, etc.), or if certain directories are disallowed from using it, or if they can turn it back on, or if you can turn it on yourself (see my tutorial (http://javascriptkit.com/howto/htaccess4.shtml)).
And if none of that works, I'd get a new host...it is somewhat similar to paying for a host that doesn't let you use images, or makes you do everything in plain text...huh?
Brandon
06-19-2002, 09:39 PM
so its possible that I just have to change the extension? What should I try? right now I use *.shtml
boxer_1
06-19-2002, 10:10 PM
Originally posted by Brandon
so its possible that I just have to change the extension? What should I try? right now I use *.shtml
.shtml is the file extension you should be using for SSI support. [url=http://javascriptkit.com/howto/externalhtml3.shtml]See here[/b] for more details.
If that's not working, then the problem is most likely with your host (as Feyd indicated). At the very least, you should bring this to the attention of your host (in detail). Send him/her a link to this thread if neccessary and let them know you need to get this issue resolved ;).
Originally posted by Brandon
The code I am using is:
<!--#include virtual="/sitewide/top.txt"-->
Here are some steps to try...
1. Put a space after the last double quotes.
<!--#include virtual="/sitewide/top.txt" -->
2. If that does not work, try changing the word virtual to file. (Always keep the space in though from step one)
<!--#include file="/sitewide/top.txt" -->
3. If that still does not work, try taking off the starting forward slash in the value. Try both the virtual and file modes on this one...
<!--#include virtual="sitewide/top.txt" -->
<!--#include file="sitewide/top.txt" -->
4. One final try if all of that fails is to change the txt file into an shtml extension instead. For some reason in rare cases, txt files just don't want to work :P
Jeewhizz
06-20-2002, 11:08 AM
Originally posted by pb&j
3. If that still does not work, try taking off the starting forward slash in the value. Try both the virtual and file modes on this one...
<!--#include virtual="sitewide/top.txt" -->
<!--#include file="sitewide/top.txt" -->
That's a standard file reference.. i.e. it will start from wwwroot :)
Brandon
06-20-2002, 05:59 PM
I've tried both ways, virtual and file, neither worked. I even tried putting the file I want to access in the same directory has the rest of my .shtml files. I've tried chmoding to 777, nothing worked. I am going to try the .htaccess file now, but I doubt that works :(
Jeewhizz
06-20-2002, 06:03 PM
I think it must be your host - esp. cos it just 'switched' like that
I'd move :)
Brandon
06-20-2002, 08:51 PM
I would too.. and I am trying to talk my client into moving... but as I mentioned before, they are friends. So I might get stuck typing it all out every time
Graeme Hackston
06-20-2002, 11:39 PM
FrontPage include pages work without FP extensions .