Forum Moderators: phranque

Message Too Old, No Replies

AddType not working

What am i doing wrong?

         

krakrazor

9:58 pm on Mar 17, 2006 (gmt 0)

10+ Year Member



I am trying to get my server to parse '.my' files as php... it's not working out for me. I've tried lots of things... none work

Here is my .htaccess:

RewriteEngine On
RewriteCond %{HTTP_HOST} ^site.com
RewriteRule (.*) http://www.site.com/$1 [R=301,L]

AddType application/x-httpd-php .my

ErrorDocument 400 /errors/401.html
ErrorDocument 401 /errors/402.html
ErrorDocument 403 /errors/403.html
ErrorDocument 404 /errors/404.html
ErrorDocument 500 /errors/500.html

here is my index.my:


<?php
require("../includes/pages/pages_index.php");
?>

output is:

<?php
require("../includes/pages/pages_index.php");
?>

What am i doing wrong?

jdMorgan

1:14 am on Mar 18, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



It looks like it's working just fine...

With AddType [httpd.apache.org] you have told Apache that the file's MIME type is "application" and that it therefore is to be handled (executed) by the client. So, Apache will serve the contents of the file rather than passing it to the PHP interpreter for execution.

Try using


AddHandler server-parsed .php .my

instead.

Jim