Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

HeaderName in .htaccess do not uses .php extension

I have assigned HeaderName path/.../head.html in .htaccess,in which my php page (as it is set in action tag in a form at head.html) is sending output from html to another page (that's obvious), and to display output on the same page, I must build my php code with html on the same page, and save it as .php extension, but HeaderName in .htaccess is not accepting .php extension, also I am strictly not allowed to use superglobal variables (like SESSION) !! please help,,

like image 927
Shivanshu Avatar asked Oct 20 '25 05:10

Shivanshu


1 Answers

This is how you use .php fine in HeaderName directive:

AddType text/html .php
Addhandler application/x-httpd-php .php
HeaderName /includes/header.php
like image 96
anubhava Avatar answered Oct 21 '25 20:10

anubhava



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!