I'm not an expert on all of this, but it seems to me that it could be done more simply with ".ssi" files. Simply write a header.ssi and a footer.ssi file. Then, assuming that the pages have a header and footer now, use some good text editor with a search and replace function and replace each header and footer with the appropriate ".ssi" file?
thats an idea, use SSI includes, althought PHP has a better performance and many servers have SSI disabbled.
Hi, when I use this rewrite mod thing, I get only header and footer, no file is displayed. Any suggestions?
Yes, I have php and apache with rewrite mod. I did it exactly as you wrote it but everthing I got was header/footer.
No idea to be honest... Someone had the better idea (somewhere in this thread) of doing it at the Apache level, rather than with PHP. Which actually is a better idea..
I am using digital point's method. It works great, but it applys the header and footer to all file types, including MP3's. Considering I have people hosting there files on my site, this is a problem. How do I restrict it to only specified file types?
Hello. Take a look at mod_layout. http://tangent.org/index.pl?lastnode_id=478&node_id=362 mod_layout is an Apache module that provides both a Footer and Header directive to automagically include output from other URIs at the beginning and ending of a Web page. It can be used to wrap documents for a standard look and feel for a site (or to insert banners on any given document in a site). Currently known to support mod_perl, PHP and Apache JServ. Should support just about any type of handler. Code (markup):
I looked into the module, but I can not use it because I do not have access to httpd.conf. Any other solutions?
Shawn's solution seems like the best way to go, without manually adding to each file. Also you could use a solution such as index.php?module=pagename where it would load the pagename.php. Though unless you use a select case that has security risks. Pm me if u need more help