View Full Version : SSI on an HTML page
steffield
01-08-2001, 11:13 PM
The program I am using to create dynamic pages, will only do so in .html format, and not .shtml format as I would like to have SSI present within the code.
Anyone know the exact text I have to put in my .htaccess file to allow standard .html files to include SSI's.
Also, how can I view and edit my present .htaccess file??? I have WS_FTP Pro6 if that's any help, I have absolutely no experience of TelNet or Shell Sessions, so it's gonna be useless saying that without describing what I have to do.
Thanks People
Ian Gunter
http://www.steffield.com
First, create a file on your system called htaccess.txt
After you upload it (FTP), Rename it to .htaccess
If you want to see what yours currently looks like, click on your .htaccess and transfer back to you. WSFTP will ask for a file to name on your system. Name it htaccess.txt (or something). Then you can view it.
To allow standard .html files to show SSI, here's what you put in your .htaccess (at the end):
AddType text/html .shtml .shtm .html .htm AddHandler server-parsed .shtml .shtm .html .htm
then save it. Make sure when you transfer your htaccess.txt back to the server, use ASCII mode. and rename it to .htaccess
steffield
01-09-2001, 02:18 AM
I finally did it - thanks Alan and Graham, I was entering .shtml instead of .html
I can now get my site finished.
Thanks
Ian Gunter
manzarek
01-10-2001, 11:42 AM
Well, just tried to do what is listed above, and I can't get my voting SSI script to show on a regular html extension page.
Can someone have a look? Heres the page, which should have a shopping poll on the bottom right about amazon:
http://www.thewebstoreguide.com/800.html
Thanks!
Rich
BCFirstAid
02-08-2001, 03:06 AM
Does anyone know how I can set it to parse within a parsed script? My old server would do it, but when I transfered pages, it doesn't work. I applied the above .htaccess changes, but still nothing.
I've got a SHTML loading <#include virtual="/filename.html'> and within filename.html, I have another SSI'd file.
???
Chris
webmaster@bcfirstaid.com
BCFirstAid
02-08-2001, 03:08 AM
Never mind... just answered my own question - made the first SSI for an SHTML file instead of HTML. Looks like the changes for the server to parse HTMLs doesn't work!
Chris
webmaster@bcfirstaid.com
ADPankow
02-08-2001, 08:38 PM
Well your using the wrong SSI tag rather than it being <#include virtual="/filename.html'> it should be < !--#include virtual="/filename.html" -- > (minus the spaces at the begining and end) see if that works :)
[Edited by ADPankow on 02-08-2001 at 08:41 PM]
BCFirstAid
02-09-2001, 04:58 AM
Actually, I took out the !-- and -- just so it'd sho in the forum, but thanks! ;)
Chris
gnorthey
02-09-2001, 08:36 PM
Hmm... never seen that code before, but it works!!!! I think it works faster than the evil CGI I'm using, I guess I gotta use this now instead of what I'm using now.
vBulletin® v3.7.0, Copyright ©2000-2009, Jelsoft Enterprises Ltd.