How can I get to work AddHandler/Action directives in .htaccess for a new file extension?
.htaccess file contains
AddType text/html .ahtml
AddHandler Braces2APL .ahtml
Action Braces2APL /home/nars205/public_html/cgi-bin/foo.php
Options Indexes FollowSymLinks Includes ExecCGI
followed by the original content.
The files foo.ahtml and foo.php are pretty simple. Invoking foo.ahtml from a browser fails with 404. Renaming foo.ahtml to foo.html and invoking it from a browser works as expected. Invoking /cgi-bin/foo.php from a browser works as expected. The access_log just shows that there was a 404. The error_log shows no problems. There PHP error log is empty as there are no PHP errors and the PHP executable wasn't invoked.
What am I missing?
Hello Sudleyplace,
Thanks for the question about the Addtype handlers in the .htaccess file. If you're adding a type, it usually needs to be supported on the server and also by Mime type. They talk about PHP issues with add handlers in this post.
Some of the changes that are mentioned may require some changes at the server level, which we cannot do from the Support Center website. You would need to submit a ticket to our live technical support team.
I hope this helps to answer your question. If you have any further questions or comments, please let us know.
Kindest Regards,
Arnel C.