This article is about to explain the trick to auto append and prepend the php file using htaccess file. Surprised?
Normally all project have some files which needs be included in all files of your project. Or there can be some files which needs to included at the starting of page execution and some file which needs to be included at the end of each page.
In these cases you can write these two lines in your .htaccess file which will helps you for sure.
Prepend File using .htaccess
You can write below code in your .htaccess file for the same.
Append File using .htaccess
You can write below code in your .htaccess file for the same.
Conclusion
This trick will be useful for the file which has all your functions defined you can prepend this file and for the file like footer you can add this as a append file using this trick.
You can refer to articles related to htaccess tricks at this category, also you can subscribe to our RSS feed using your email address.