Forum Moderators: phranque

Message Too Old, No Replies

.htaccess not working- help with correct procedure

Is this the right way to do it.

         

lisa3711

3:15 pm on Nov 2, 2006 (gmt 0)

10+ Year Member



We are trying to get files in one directory to be parsed as php, but with the html extension, using .htaccess files.

My sys admin says that she tried, and even tried editing htconfig to allow override. I think this should have worked, and want to send her exact instructions.

From my research, I think we should have in httpd.conf:

<Directory /var/www/devwww/html/business/>
AllowOverride FileInfo
</Directory>

.htaccess file would say:
AddHandler application/x-httpd-php .html

One other complication: this apache server is a virtual host...?

What am I missing?

Thanks!

jdMorgan

6:59 pm on Nov 2, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



It looks like you're mixing up AddType and AddHandler.

AddHandler php-script .html
AddType text/html .php

Refer to the Apache core documentation for AddHandler, and to the Apache mod_mime documentation for AddType.

Jim

lisa3711

1:23 pm on Nov 6, 2006 (gmt 0)

10+ Year Member



thanks, I will try that!