Page 1 of 1

How do I get the SSI to work?

PostPosted: Fri Jan 02, 2009 12:10 am
by nickp
I have an HTML page which I want to be able to display to the user his IP Address.

I tried to use the SSI comment in my page:
<!--#echo var="REMOTE_ADDR"-->

When I uploaded the page to my server, it did not show the IP.

Is there something that must be activated?

Thanks

PostPosted: Fri Jan 02, 2009 3:25 am
by randy
Hello Nick,

The SSI code you are using is correct. However, you should save the web page with ".shtml" extension. Then the page will display the IP address.

Otherwise, if you wish to parse .html or .htm files as SSI or .shtml pages, you need to include the following lines in the .htaccess file, inside your account's public_html.

==================
AddType text/html .shtml
AddHandler server-parsed .shtml .htm .html
Options Indexes FollowSymLinks Includes
==================

If you have further questions, do let us know. :)

CWH wishes you a very happy 2009!

PostPosted: Fri Jan 02, 2009 8:41 am
by nickp
Thanks Randy.

That did it.

Have a great New Year!

PostPosted: Mon Jan 05, 2009 6:25 am
by smisha
Hello Nick,


Thank you for your feedback :)