SSI (Server Side Includes) and VSD -...

User 38401 Photo


Senior Advisor
10,951 posts

Hiya John,

You're quite welcome. I'm glad you got the main problem figured out, and don't feel too dumb, server stuff can get pretty confusing for many of us and I'm sure I would have had the same problem.

As for the server that is messed up. If you're able to connect to FTP just go in and delete all the files that VSD has uploaded and reupload the correct files from VSD again and it should fix that problem.
User 562592 Photo


Registered User
2,038 posts

Jo Ann wrote:
Hiya John,

You're quite welcome. I'm glad you got the main problem figured out, and don't feel too dumb, server stuff can get pretty confusing for many of us and I'm sure I would have had the same problem.

As for the server that is messed up. If you're able to connect to FTP just go in and delete all the files that VSD has uploaded and reupload the correct files from VSD again and it should fix that problem.


Jo Ann is right on. This would be the best solution. I am glad you are on a linux server now. There really is no reason for anyone to use a windows one *small snicker*.

As a side note: I don't like all the insults John. You have learned quite a bit in a short period of time, so give yourself some credit. We have all had to go through the initial learning phase, but you have an overall good team of support here through CoffeeCup. And no one here is thinking "what a fool!", instead they are thinking, "I wonder how I can help"!

Stay positive.

Need anything else let us know. :D
The philosopher has not done philosophy until he has acted upon the mere conviction of his idea; for proof of the theory is in the act, not the idea.

My Web Development Company: http://www.innovatewebdevelopment.com (Created with Coffee Cup Software).

My Personal Website: http://www.EricSEnglish.com

User 2034657 Photo


Registered User
64 posts

Hi Eric,

Yes, I do need something else: Can you help me with a new car? :P

And yes, I am still a positive thinker. I love the challenges that this process offers, and the learning that goes along with it. Being a retired college teacher, I love to learn. I hope that someday soon I will advance to a level where I can, in turn, offer help to those who are new and learning the software and website development, etc.

The fora culture here at CC is outstanding, and it's one of the reasons I will stay with CC products.
John H.
________________________________
A good mind is like a sponge in water.
User 2034657 Photo


Registered User
64 posts

Hi Eric and Jo Ann, again!

I learned something very interesting early this morning (about 2 AM). Remember one of my websites was doing a download when accessing the site? The culprit was the .htaccess file that I had in the root directory on the server. This file had one "simple" line of code: AddType text/x-server-parsed-html .html

I removed the .htaccess file from the server, and all worked well including my DHTML menus that were included into my pages using a #include statement in my pages. Now this raises an interesting question. My web pages have an html extension, and so does the menu code file on the server. I wonder how it is that my menus are working fine without the .htaccess file on the server when my research on SSI says one needs to have the .htaccess file on your server. Are the Angels looking after me?

What do you think about this?

John H.
________________________________
A good mind is like a sponge in water.
User 562592 Photo


Registered User
2,038 posts

I don't believe you have to have a .htacess file in order to use the include. What I think is even more strange though is that you are not using .shtml extensions and its working. This I have never heard of either. I fear that at some point that will catch up with you, the angels will fall and your menu wont work. That is a development nightmare. I would still change the main files to .shtml just to be on the safe side.
The philosopher has not done philosophy until he has acted upon the mere conviction of his idea; for proof of the theory is in the act, not the idea.

My Web Development Company: http://www.innovatewebdevelopment.com (Created with Coffee Cup Software).

My Personal Website: http://www.EricSEnglish.com

User 2034657 Photo


Registered User
64 posts

Hi Eric,

From my research, one of the uses of the .htaccess file is to allow includes to work without having shtml extensions. I believe the .htaccess statement AddType text/x-server-parsed-html. html instructs the system to parse html pages looking for SSI directives. As you point out, it is curious that my pages are being parsed (apparently) without the .htaccess file.

About shtml pages: I am not (yet) an html coder so I am using VSD for my sites. VSD seems to make pages automatically with an html extension. It looks like I will have to manually change my page extensions to shtml, but at least, then I will not have to deal with the .htaccess file, and my pages will automatically be parsed for SSI directives before they are sent to the user.

Thanks, Eric, for your good advice.
John H.
________________________________
A good mind is like a sponge in water.
User 38401 Photo


Senior Advisor
10,951 posts

None of the research I did suggested you had to have an .htaccess file setup for it at all. But much of my research did say that it isn't 100% necessary to change your files to .shtml and also said to test this out. If it works without it you should be ok according to the pages I was reading. If it doesn't work, it suggests to then change the page names and see if it works. Like a dumb butt I cleared my history cache a couple days ago when I ran ccleaner so I can't get to all the pages that I was looking at and only seemed to have saved the apache.org one.

I will try this later today or tomorrow if I don't get a chance and I'll see if it works for me this way. I think it has something to do with how specific servers are setup so we'll see.

This site seems to be pretty easy to understand, not sure how correct it is, but if it's correct then the only page that has to be in .shtml format is the main page you plan to put the inclusions on. The other inclusions can actually have a multitude of different extentions including having them in .html format.
http://www.yourhtmlsource.com/sitemanag … ludes.html

Unfortunately for me this is where it makes me stop because this would make me have to start SEO ranking all over again as if I had any to start with, but every little bit counts LOL.
User 2034657 Photo


Registered User
64 posts

Hi Jo Ann,

You stated, "...the only page that has to be in .shtml format is the main page you plan to put the inclusions on." Are you referring to all pages in your site that have inclusions? The reason I ask this is that I will have inclusions on ALL of my pages for navigation menus and logo placements, etc.

I ask this because (initially) the reason I want to use SSI is so that it will be easy for me to maintain my navigation menus. Using includes, I can put just one line of code into each of my pages that will insert the DHTML menu code from the server. As I make changes to the menus, I just need to maintain the one file that resides on the server.

I'm still not clear on the page filename extension issue. I read that you don't need to have shtml extensions; however, Eric recommends that I name all my pages with an shtml extension. What do you think about this issue? Is it clear to you? I'm not sure.
John H.
________________________________
A good mind is like a sponge in water.
User 38401 Photo


Senior Advisor
10,951 posts

Well I would say take a look at the page I put the link on and see if what they say makes sense. According to that page (which I didn't verify dates of it or anything so it could be old for all I know lol) you can name the included pages with many different extensions, and they actually suggest you use the .ssi extension so you can keep it easier to find them. They say the main pages you are putting the inclusions onto are the ones that need to be renamed to .shtml for it to work.

How you have it working I've no idea. Eric would definitely know way more about this than I do as I'm basically sitting in your shoes and asking questions on it too. Maybe Eric will take a look at that link and give a response on if it's accurate or not :)
User 2034657 Photo


Registered User
64 posts

Hi Jo Ann,

Yes, I have read the link you provided several times. I discovered it a few days ago, and I have saved it in my Favorites. The file that contains the html code to be inserted into your pages resides on the server, and it can have any extension such as html, ssi, or whatever you wish. The important issue is you must properly identify the filename in your pages that have the #include directive. I think I'm going to have my html code files keep the html extension because I plan to keep then in a folder called includes in the root directory on the server. The only files I will put in the includes folder will be the html code to be inserted into my website pages.

Unless there is a compelling reason not to, I plan to name all pages in my websites with the shtml extension as Eric recommends. It appears that will preclude the need for the .htaccess file, and all my website pages will be parsed automatically looking for SSI directives.

Hmmm....I wonder where I would be today were it not for you and Eric........Just musing! :cool:
John H.
________________________________
A good mind is like a sponge in water.

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.