Forum Moderators: coopster

Message Too Old, No Replies

HTML pages treated as PHP by the server.

HTML pages treated as PHP by the server.

         

fernell011

5:32 am on Feb 16, 2004 (gmt 0)

10+ Year Member



Hello and thanks in advance:

I'd like all my HTML pages treated as PHP by the server. I know it's possible. How do I do that?

Thank you all for your time.

Regards
F.

jamesa

6:17 am on Feb 16, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If you're using Apache, look for a line inthe httpd.conf that looks like:

AddType application/x-httpd-php .php

and change it to:

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

then restart Apache.

lasko

8:16 am on Feb 16, 2004 (gmt 0)

10+ Year Member



Or if your on a share hosting account insert

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

in a .htaccess file which overrides the Apache config.

Create a text file call it .htaccess without the txt extension and upload to your root directory.

That will tell apache to parse all .htm .html .php files

fernell011

2:27 pm on Feb 16, 2004 (gmt 0)

10+ Year Member



fantastic. Thank you guys....

fernell011

3:13 am on Feb 18, 2004 (gmt 0)

10+ Year Member



Actually:

not that easy:

my htacces file is as follows:

===============================

# -FrontPage-

IndexIgnore .htaccess */.?* *~ *# */HEADER* */README* */_vti*

<Limit GET POST>
order deny,allow
deny from all
allow from all
</Limit>
<Limit PUT DELETE>
order deny,allow
deny from all
</Limit>
AuthName qb
AuthUserFile /vhmap/a/c/h/achievetopranking.com/htdocs/_vti_pvt/service.pwd
AuthGroupFile /vhmap/a/c/h/achievetopranking.com/htdocs/_vti_pvt/service.grp

=========================

Should I just add 1 line at the end of the file?

Please advice.
Thanks.