[Help,please..] PHP

Hello, I have some basic php questions.
I tried to call a .php file on my .html file with this code:

<?php include 'abc.php';?>

and here what I put on .htaccess:

AddType x-mapp-php4 .html .htm
AddType x-mapp-php4 .php3

it worked on my other site (on different host). Why I couldn’t use that on dreamhost? should I use something like this instead?

<?php Include("abc.php"); ?>

Another question, how can I redirect the non-existing files?
Can I just use something like this on .htaccess?

ErrorDocument 402 http://www.abcdef.com/404error
ErrorDocument 404 http://www.abcdef.com/404error

Last question, how can I prevent someone to access to a specific folder (directory) other than setting up a password (i.e., by re-directing to another page)?
For example, if someone try to access directory “abc” instead of asking for username & password, he/she will be re-directed to an existing page (i.e., back to homepage)?

Thanks in advance :slight_smile:

Wow. Three issues in one thread :slight_smile: ! Might as well, I suppose, as all can be addressed with a single url:

This Dreamhost Wiki Article on .htaccess has the answers to all of your questions!

(Hint 1: look at AddHandler rather than AddType)
(Hint 2: Search the Wiki for other relevant help)
(Hint 3: Google is your friend :wink: )


Thanks much, rlparker! :slight_smile: