Forum Moderators: coopster
I had a handler in .htaccess so I can parse .txt files as php
It doesn't work anymore. When I head to my .txt files I can now see all of the php code.
AddHandler application/x-httpd-php .txt<Files directory>
SetHandler application/x-httpd-php
</Files>
Is there a change I have to implement to get it working again?
www.example.com/page.txt
Or do you want to use .txt files as includes to be included on pages with an .html extension? Are your pages like this? Which are you using?
example.com/page.html
When I moved a site to a host with PHP5 what I had used with PHP4 didn't work, I had to play a bit and got this to work to use .php on .html (or .htm) pages, it works for using .php with either file extension:
AddType application/x-httpd-php .htm .html
But you posted an example you tried in the other thread which didn't work for you:
AddType application/x-httpd-php .txt .php
Why did you have .php in there?
what it is you want to do. Do you actually have files you want to use php code on with a .txt file extension? Are you using pages like this on your site?
AddType application/x-httpd-php .txt .phpWhy did you have .php in there?
I deleted this entry via cpanel and re-created it, still no luck. I tried a number of variations posted on this site and around the web and I still can't get it to work. Is there possibly a security function I have to enable/disable on the VPS to allow this parsing to take place?