difficulty viewing .shtm in Mozilla/FireFox

liunx

Guest
I'm having an odd problem with the website that I created for my company.<br />
<br />
As pointed out to me from a reader of our site, our 'Tip of the Week' page is displayed incorrectly under a Netscape-based browser. The browser didsplayes the page in it's raw code form. They supposed it was because of the .shtm suffix, though I am able to view other .shtm files on other sites with FireFox. <br />
<br />
I can only suppose that it is something that I've fouled up in the coding. Would anyone have any idea on how I can fix this problem?<br />
<br />
The Tip of the Week page is located at <!-- m --><a class="postlink" href="http://www.turftamerinc.com/tip.shtm">http://www.turftamerinc.com/tip.shtm</a><!-- m --> <br />
<br />
(Don't be too harsh on the design and coding stuff; this is the first website I've ever done; it's normally not my job, though I've enjoyed the experience)<br />
<br />
Thanks to anyone that wants to help!<!--content-->Do all files on that server with the shtm extension do this? If so, you may need to add:<br />
<br />
AddType text/html .shtm<br />
AddHandler server-parsed .shtm<br />
Options Indexes FollowSymLinks Includes <br />
<br />
to your .htaccess file.<!--content-->Yes, all the .shtm files do the same thing. However, I think I might know what the problem is now.<br />
<br />
When I first did the weekly tips using SSIs, we were on a server that could handle it. A while back we changed hosting companies, and their server currently does not understand SSI files, and I had to change the menu to a library item. I left the file as a .shtm extension in the hopes that they would install the necessary files on the server so it could handle the SSIs. I've asked them about it, but I don't know if they will do it in the near future.<br />
<br />
I might just have to rename all the files as just a .htm file, if it is the .shtm that is throwing a wrench in the gears. It will just be a long process.<!--content-->yes the includes are handled server side, hence server side include, so it is not going to be a browser issue when the scripts do not fire. Up in the asp forum people ask how come my code does not work for ie users... well it does not work for mozilla people either, because it isnt a browser issue! But anyways what does your server support scripting wise, you can also be doing includes with asp, asp.net, php, jsp, cgi, and cold fusion.<!--content-->I'm pretty sure the server supports php and maybe cgi. It uses Apache. I can't check the server itself right now though; it's down for some reason.<!--content-->If you're using Apache try creating a .htaccess file with the lines above...<!--content-->Umm, at the risk of sounding ignorant, where would I put this .htaccess file, and how do I change the file permissions for it? Also, I read somewhere that some .htaccess files will screw up server speed.<br />
<br />
I know not what I do . . .<!--content-->Put it in the directory where you have the shtm files. Shouldn't need to change any permissions on it as it probably doesn't exist yet. As to server speed, it is possible to make the server process every file request with it, but we're only telling it to look at a specific file extension.<!--content-->I created and uploaded the .htaccess file, and now I can see my .shtm pages just fine. Yay!<br />
<br />
The server still isn't including the SSIs, however. I created a test page with SSIs at <!-- m --><a class="postlink" href="http://www.turftamerinc.com/Archive/tiptest_apr12_2004.shtm">http://www.turftamerinc.com/Archive/tip ... _2004.shtm</a><!-- m --> that should have a monthly archive via SSI at the bottom. Any idea on how I could get that working, or should I just leave well enough alone for now?<br />
<br />
Thanks for all your help, by the by!<!--content-->I thought the line:<br />
<br />
Options Indexes FollowSymLinks Includes<br />
<br />
should have opened that up... Let me check to see what I can come up with...<!--content-->Checked the documentation and you should be good. May want to check the path to your include. When I do a view source, down near the bottom I see "[an error occurred while processing this directive]" I get a similiar message sometimes when I've fat fingered the path for the include.<!--content-->This is how I sourced the include file:<br />
<br />
<!--#include file="../Library/TipArchiveExpandMenu.htm" --><br />
<br />
Should I try a different syntax?<!--content-->Try changing the file= to virtual= <br />
<br />
"file" is for use when the include is in the same directory or a subdirectory of the document's directory. "virtual" is for use in most of the remaining instances.<!--content-->Eureka, we have a winner! <br />
<br />
It's all working perfectly now, yay!<br />
<br />
Thanks for all your help<!--content-->
 
Back
Top