Forum Moderators: coopster & phranque

Message Too Old, No Replies

Test to see if pages are SSI-enabled?

         

Acternaweb

6:59 pm on Jul 26, 2001 (gmt 0)

10+ Year Member



How do you know if a page is SSI-enabled? Can your make a non ssi enabled page enabled?

thanks,

Brett_Tabke

7:17 pm on Jul 26, 2001 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



Testing SSI's

You can test SSI with a simple SSI command that prints the current system time and date to the screen.

We test with the echo command to echo the current date to the screen. It will also echo other system variables to the screen and is handy for testing if SSI is enabled on a server.

<!--#ECHO var="DATE_LOCAL" -->

SSI's Still Not Working?

You may need to enable SSI's on your system. You can do this with an Apache .htaccess file. Simply place a filenamed .htaccess in the directory where you wish to enable SSI's, with the following format:

AddType text/html .htm .html .shtm .shtml .sht 
AddHandler server-parsed .htm .html .shtml .sht .shtm

The AddType line enables SSI's for standard SSI file types. Some systems use ".shtml" for SSI extensions. Before using an .htaccess file, you might try SSI's in a html file with the extension: ".shtml". The add handler line informs Apache that it needs to parse those file types you just added in the AddType line.

More SSI Resources:
A long article on Apache SSI's [irt.org].
Another nice tutorial on SSI's [shore.net] and Using SSI's [shore.net].
Sunsites tutorial on Includes [sunsite.icm.edu.pl].
Australian National University Command Reference [anu.edu.au].

Acternaweb

4:03 pm on Jul 27, 2001 (gmt 0)

10+ Year Member



Great a lot that works.

Now what about PHP?

I tried <?php echo $HTTP_USER_AGENT; ?>
but I didn't get an "answer" just the string <?php echo $HTTP_USER_AGENT; ?>