Jump to content

Recommended Posts

Posted
Username: sanox, Server: Tommy, Main domain: rcp.helioho.st

Hello,


how to edit .htaccess in order to render php code as html ? I tried
following but none works:
AddHandler x-httpd-php56 .php .html
AddHandler cgi-script .php .php3 .html .htm
AddType application/x-httpd-php .html .htm
Sorry I spammed the discord also, but since I am not regular there I decide
it is better to write an email.
Thanks in advance for a reply.


Best Regards,
Ivaylo

Posted

.htaccess:
<Files ~ \.(htm|html)$>
    SetHandler fcgid-script
    FCGIWrapper /var/www/cgi-bin/cgi_wrapper/cgi_wrapper .htm
    FCGIWrapper /var/www/cgi-bin/cgi_wrapper/cgi_wrapper .html
    Options +ExecCGI
</Files>

php.html:
<?php
echo "This file ends with .html!!";

Working example: https://krydos.heliohost.org/php/php.html

  • Krydos locked this topic
Guest
This topic is now closed to further replies.
×
×
  • Create New...