Forum Moderators: phranque
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?
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
Jim