Featured in "6 Secrets to Explosive Web Traffic"



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.






Computer Cases | Point of Sale POS Software | Nortel Phones
Shopping | Krawatten | Packet Sniffer
Richard Li | | Used Car - Used Cars


Home| Frequently Asked Questions | Sponsorships
the Currency Exchange Calculator | the World Wide Clock
The Daily Laugh! | Timeandweather | "Quotables"
Contact us!
Andrews Long Distance



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