Addhandler php html

  • I will take a look on my magic marble.. :)
    Wait... Wait... Wait..
    Here the answer:
    Take a look in you error log.

  • @TheCry :)


    @gOOvER You're right ;)


    Should be



    Code
    1. RewriteEngine OnRewriteBase /
    2. RewriteCond %{HTTP_HOST} !^www\. [NC]
    3. RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]
    4. RewriteRule ^(.*).Html$ $1.php


    Note: I've just fixed the syntax. I've not tested those rewrite rules.

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206

  • Indeed, in that specific case, the rewrite rules above will not work because they are asking apache to translate any virtual <whatever>.html file to real file <whatever>.php.


    you'are using php5-fpm?


    If yes, you should try to add this in the .htaccess of your customer;


    Code
    1. AddType application/x-httpd-php .html


    Note: (You'll have maybe to change it vhost to allow those directive in its .htaccess file.


    and also edit its fpm pool conffile to allow execution of .html files.


    Code
    1. security.limit_extensions = .php .html


    Note: Not tested ;)

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206

  • I had to modified the

    Code
    1. AddType application/x-httpd-php .html


    to

    Code
    1. AddType application/x-httpd-php5 .html


    I'm using php-fpm indeed. I include the .html entry on security.limit_extensions and the effect is that the file is not executed, the browser starts to download the file.


    The fpm pool is located in /etc/php5/fpm/pool.d/ isn't it?