2
0
Fork 0
mirror of https://github.com/phanan/htaccess.git synced 2018-11-08 13:39:40 +01:00

Added custom PHP handlers

This commit is contained in:
Alexander Matzen 2017-10-02 20:17:45 +02:00 committed by GitHub
parent f632e2158e
commit 6fdb80e44f

View file

@ -45,6 +45,7 @@ What we are doing here is mostly collecting useful snippets from all over the in
- [Turn eTags Off](#turn-etags-off) - [Turn eTags Off](#turn-etags-off)
- [Miscellaneous](#miscellaneous) - [Miscellaneous](#miscellaneous)
- [Set PHP Variables](#set-php-variables) - [Set PHP Variables](#set-php-variables)
- [Assign PHP to filetype](#assign-php-to-filetype)
- [Custom Error Pages](#custom-error-pages) - [Custom Error Pages](#custom-error-pages)
- [Force Downloading](#force-downloading) - [Force Downloading](#force-downloading)
- [Prevent Downloading](#prevent-downloading) - [Prevent Downloading](#prevent-downloading)
@ -449,6 +450,16 @@ php_value upload_max_filesize 50M
php_value max_execution_time 240 php_value max_execution_time 240
``` ```
### Enable PHP on different filetypes
``` apacheconf
AddType application/x-httpd-php <filetype>
AddHandler application/x-httpd-php <filetype>
# Enable PHP in .HTML and .HTM files
AddType application/x-httpd-php .html .htm
AddHandler application/x-httpd-php .html .htm
```
### Custom Error Pages ### Custom Error Pages
``` apacheconf ``` apacheconf
ErrorDocument 500 "Houston, we have a problem." ErrorDocument 500 "Houston, we have a problem."