Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to include php file in .htaccess?

How to include php file using .htaccess? I google it but i cant find a good tutorial or code.

Here is a php include code :

<?php require('footer.php'); ?>
like image 681
Sumanta Avatar asked Dec 12 '22 11:12

Sumanta


1 Answers

This code is Prepend the file

php_value auto_prepend_file "/dir/path/utilities.php"

This code is Append file to bottom of the page

php_value auto_append_file "/dir/path/templates/footer.php"

I found this answer in http://samweby.blogspot.in/2013/07/prepend-and-append-htaccess-file.html link.

like image 190
user2757070 Avatar answered Dec 22 '22 16:12

user2757070