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.
- 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.
- Can I enable anonymous FTP access in my cPanel? (Views: 1542)
- How do I use the CGI Center in the cPanel? (Views: 3052)
- How do I create a PGP Certificate Under GnuPG Keys? (Views: 1267)
- How do I add a new MIME type in the cPanel? (Views: 1187)
- How do I use Cron Jobs in my cPanel? (Views: 1268)