PDA

View Full Version : turning on php parsing with .htaccess


Klove
2004-10-06, 10:29 AM
Been searching the web to do this, but seems I cant find the write code, or whatever.

Damn SSI why cant they work! ;P

If anyone can help it would be appreciated.

Cleo
2004-10-06, 10:36 AM
There has been some threads on this. Have you tried using the board's search?

Klove
2004-10-06, 10:46 AM
Cleo, I checked for php parsing before I searched, all I found was two threads, this one, and some idiot who got his domains banned.

Cleo
2004-10-06, 11:03 AM
http://www.greenguysboard.com/board/showthread.php?s=&threadid=2461&highlight=php+and+includes

ChristyB,

heres a great little trick that will save your life. Put the following line of code in your .htaccess file

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

after this the server will parce the php code in your html pages

will work on all servers using apache. if it doesn't work talk to your admin.

to test it just put this line of code in your html file as it

<?phpinfo();?>

it will give you your server info if the .htaccess is correct



__________________
{fusion}

mikeyddddd
2004-10-07, 10:15 AM
I had to put that after allowing .htm & .html to be parsed like this:

AddType text/x-server-parsed-html .html
AddType text/x-server-parsed-html .htm
AddType application/x-httpd-php .html .htm

Great tip! Thanks, Cleo.