The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> include code stopped working when I changed servers
nWo Sting
post Mar 14 2007, 12:05 AM
Post #1


Member
***

Group: Members
Posts: 63
Joined: 5-November 06
Member No.: 709



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

I changed web servers and my php codes work fine, however the above include code no longer works. I have the correct directory name, and the correct file.htm name, but nothin happens. Is there an alternate code? My new hosting company, Lunar Pages said they support SSI and this code should be working. They said they do not know why it wont work. The header, etc I am inlcuding are all located in different folders than all of the actual pages they are going to be on, so I am using "virtual" instead of "file".

Do I have to create this htaccess file I was reading about? Because my last server just let me simply add this included code <!--#include virtual="/directory/included.htm" --> and I did not have to do anything else.

I did find an htaccess file with my new server under the main folder for my online files, that htaccess file currently says.... AddHandler x-httpd-php5 .php

so perhaps I need to add something???

thanks

This post has been edited by nWo Sting: Mar 14 2007, 12:51 AM
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Mar 14 2007, 03:55 AM
Post #2


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,730
Joined: 9-August 06
Member No.: 6



What extension does the document where you use the SSI include have?
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
nWo Sting
post Mar 14 2007, 08:50 AM
Post #3


Member
***

Group: Members
Posts: 63
Joined: 5-November 06
Member No.: 709



QUOTE(pandy @ Mar 14 2007, 02:55 AM) *

What extension does the document where you use the SSI include have?



.htm

the pages for this particular section are all .htm, and the includes are also .htm

I would like to keep the pages as .htm bevcause I would have to rename too many if I need to make them .html or .shtml
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Mar 14 2007, 10:32 AM
Post #4


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,730
Joined: 9-August 06
Member No.: 6



Yeah, but servers usually aren't configured to parse either .html or .html files for SSI.

Add the following line to your .htaccess file
CODE
AddHandler server-parsed shtml html htm

All the extensions listed will be parsed for SSI. You can remove those you don't want.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
nWo Sting
post Mar 14 2007, 08:09 PM
Post #5


Member
***

Group: Members
Posts: 63
Joined: 5-November 06
Member No.: 709



QUOTE(pandy @ Mar 14 2007, 09:32 AM) *

Yeah, but servers usually aren't configured to parse either .html or .html files for SSI.

Add the following line to your .htaccess file
CODE
AddHandler server-parsed shtml html htm

All the extensions listed will be parsed for SSI. You can remove those you don't want.


thanks, I forgot all about the htaccess file when I changed servers. My old server must have already had that SSI code in there. I tell people about this HTML Help website all the time. I think this site and the forums on it are some of the best resources for html codes. Thanks again for all your help.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Mar 15 2007, 03:23 AM
Post #6


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,730
Joined: 9-August 06
Member No.: 6



Welcome. smile.gif
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
2 User(s) are reading this topic (2 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 24th April 2024 - 11:09 PM