Now Here - Church Website Designs!

 

Knowledgebase

Portal Home > Knowledgebase > Cpanel > Advanced > How do I use .html files to run SSI?

How do I use .html files to run SSI?

 

Apache Handlers”

You would need to use apache handlers to specify how file types should be treated. .html files will not run server side includes by default, but .shtml files will run SSI. To allow .html files to run SSI, you will need to add a new handler for HTML:

Set the handler as ‘server-parsed’ and the extension as .html to allow SSI. Making these changes will tell the server to read the .html files in a way that will allow you to use the directives in them.

SSI Format:


Rules:

  • commands and arguments are in lowercase letters
  • double quotes around the value are required
  • there is no space until after the command
  • the hash mark is required
  • there is a space after the second double quote, before the second double hyphen at the end


NOTE: THE ABOVE FORMAT WILL CREATE AN SSI THAT WILL INCLUDE THE TEXT FOUND IN THE FILE “included.html

file= v. virtual=

“file=”

When the file that will be included is held within the same directory as the file it is calling for, you use “file=”. If the file is within a subdirectory or the directory holding the file is calling it, you can also use the “file=” argument.

“virtual=”

When you are calling for a file that is located in a position that requires an address starting at the server root you should use the “virtual=” argument.

 

 

Was this answer helpful?

Add to Favourites Add to Favourites Print this Article Print this Article

Also Read