How do I get the SSI to work?

This is a good starting point

How do I get the SSI to work?

Postby nickp » Fri Jan 02, 2009 12:10 am

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
nickp
 
Posts: 2
Joined: Fri Jan 02, 2009 12:01 am

Postby randy » Fri Jan 02, 2009 3:25 am

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!
randy
 

Postby nickp » Fri Jan 02, 2009 8:41 am

Thanks Randy.

That did it.

Have a great New Year!
nickp
 
Posts: 2
Joined: Fri Jan 02, 2009 12:01 am

Postby smisha » Mon Jan 05, 2009 6:25 am

Hello Nick,


Thank you for your feedback :)
smisha
 


Return to General Help

Who is online

Users browsing this forum: No registered users and 2 guests

cron