[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cobalt-users] asp or php on *.html



> we need a way to run asp or php by directory on *.html pages preferably
with
> htaccess

This is a simple addition to the .htaccess file. Just drop this in your
directory:
AddType application/x-httpd-php .php .html   #This parses .html files as php
Default Type application/x-httpd-php  #This parses everything in the
directory as php - use only if you need it

Other useful things for your .htaccess files regarding PHP:
php_value include_path .:/path/to/file    #this lets you set a global
include path for the directory
php_value magic_quotes_runtime off    #or on
php_value magic_quotes_gpc off     #or on
php_value auto_prepend_file /path/to/header.inc  #lets you set a global
header
php_value auto_append_file /path/to/footer.inc  #lets you set a global
footer


I've found the global include path and prepend/append lines to be the most
useful - saves me a lot of typing, don't have to put those lines into each
and every page I make.

Make sure that in srm.conf, you've allowed this site to have Override All
permissions so the .htaccess file will work

Carrie Bartkowiak