• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 145
  • Last Modified:

About special link

I saw that some file name is xxx.shtml.
What is the different between shtml and html?
And some link have not filename. for example:
http://www.myserver.com/news/
what is the target file of this link?
0
hikarutam
Asked:
hikarutam
  • 2
  • 2
1 Solution
 
hongjunCommented:
A file with the extension .SHTML means it utilizes Server-Side Includes (SSI) which enables a web developer to insert HTML (by using an SSI command) across a whole website.

>>And some link have not filename
There's actually a file running just that it is the default file. Example, if the default file is index.asp, then http://www.myserver.com/news/ will actually run http://www.myserver.com/news/index.asp


hongjun
0
 
hikarutamAuthor Commented:
I am using IIS..i also using SSI command
<!--include virtual file='header.htm'-->
but my file name is xxx.html, just no using xxx.shtml.
why??
0
 
hongjunCommented:
You uses SSI does not mean all pages got to be in shtml.
0
 
hikarutamAuthor Commented:
I mean the file name must be xxx.shtml when i use SSI command? otherwise, the web server will not run the SSI command?? if i use xxx.html, it will have problem??
0
 
gator4lifeCommented:
hikarutam -

This is directly from Microsoft's MSDN Library:

"The file containing the #include directives must use a file name extension that is mapped to the SSI interpreter; otherwise, the Web server will not process the directives. By default, the extensions .stm, .shtm, and .shtml are mapped to the interpreter (Ssinc.dll). If you have Internet Services Manager installed, you can modify the default extension mappings and add new mappings; see Setting Application Mappings. Included files can have any file name extension, but a recommended practice is to give them the .inc extension."

So, you can see that .stm, .shtm, and .shtml are just default extensions for interpreter.  In many projects that I have worked on, we have always used .inc for our SSI files, since it's meaning is easily understood: it's an included file.  Since .htm and .html are generally used to signify client-side HTML files, and NOT server-side includes, it is good programming practice NOT to use this extension on the server-side.

Hope this information helps.

gator4life
(chomp, chomp)
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now