Featured in "6 Secrets to Explosive Web Traffic"


On Your Site! On Your Site! The Universal Translator The Currency Exchange Calculator World Wide Clock Quotables Today In History The Daily Laugh! Breaking Headlines Timeandweather

Parsing PHP or ASP on .html pages

If this is your first stop on our site, please visit our homepage to find out more about this free service.


PHP

By default, PHP code only works on pages that are named something.php It does not work on something.html

You can either rename your pages .php, or, if you are using an Apache webserver (you probably are), you can tell it to parse php code on .html pages.

Follow the instructions below if you wish to have Apache parse php code on .html pages:

Look in your main web page directory for a file named .htaccess. If it is there, edit it and add a line like this:

AddType application/x-httpd-php .php .html

If you don't have a .htaccess file, use a text editor (like WordPad) to create a file, put the line above in it, then save it as htaccess.txt. Then upload it to your main directory and change the name to .htaccess (yes, it starts with a dot, and doesn't have a file extension).

Add the php code to your .html page and test.

Notes:

1)Some hosting companies limit access to .htaccess files.

2)Some ftp clients cannot see the .htaccess file even though it is there (for cuteftp use remote filtering and -a as the filter).

3)An error in your .htaccess file will cause a server error, so if you get a server error check the .htaccess file for simple errors.

ASP

By default, ASP code only works on pages that are named something.asp It does not work on something.html

You can either rename your pages .asp, or, you can tell your IIS server to parse asp code on .html pages.

Follow the instructions below if you wish to have asp parsed on .html pages:

Go to the IIS Plugin in Computer Management.

Right Click on the website you wish to administer, and select properties.

Click on the Home Directory Tab and then the Configuration Button.

Add a .html extension and copy the values for the .asp entry.

Add asp code to your .html page and test.



Home  Frequently Asked Questions  Sponsorships  Contact us!

Breaking Headlines  Timeandweather  The Daily Laugh!  the World Wide Clock

the Currency Exchange Calculator  The Universal Translator   Today In History

"Quotables"



Nortel Phones | Scripts.com | BPOS | Community-Knowledge


Copyright © On Your Site!, 2010, all rights reserved