|
By Eddy R.
4-13-00
If you've tried to use SSI (server side includes) before then you
probably know that for SSI to work, the web pages that contain the
includes must have either a .shtm or .shtml extension. This really
is not a big deal - that is if your situation is like one or all
of the following:
-
Your web server is setup to parse all files for SSI
-
You have very few web pages that use SSI
-
You do not use SSI at all
On the other hand, if you want to start using SSI on web pages
that have .asp extensions and your server does not parse all files
for SSI, then you have a big problem. What's the solution? Well,
there are two solutions to this problem.
Solution #1 - The difficult way
Rename all of your files from Asp to .shtml, but wait, If you
do rename your files, whatever ASP code is in them won't be parsed
at all because for ASP code to work your files must have a .asp
extension, also think about the nightmare you are going to have
updating probably thousands of links throughout your site. Hmm....this
really isn't the way to go.
Solution #2 - The easy way...really
Use SSI in your ASP pages!
In case you didn't know, most web servers are setup to parse ASP
files for SSI code. Yes, simply add your SSI line anywhere you want
the SSI to appear, like so:
<!--#include virtual="your_ssi_file_name.txt"-->
The beauty of this is that you do not need to rename your files
to .shtm or .shtml, and you can run both ASP and SSI code from the
same web page. Oh-oh, I think I just made someone's day :-)
|