<div>I want to write mod_layout the right way.</div><div>layout have to insert "header" after the body element, or at the top it there is no body element, but</div><div>there should be no header when there is no body and there is </frameset> on the page.</div>
<div>I modified sub_filter_module:</div><div><a href="http://rkd.republika.pl/NGINX/ngx_http_sub2_filter_module.c">http://rkd.republika.pl/NGINX/ngx_http_sub2_filter_module.c</a></div><div><br></div><div>Config options are similar to sub_filter.</div>
<div>I'm using:</div><div>sub2_filter <body 'HEADER<br/>';</div><div>sub2_filter_once on;</div><div>sub2_frameset </frameset>;</div><div><br></div><div>Sometimes it works, but when I set output_buffers to 1 1; it stopped working with html like this:</div>
<div><frameset cols="50%,50%"></div><div><frame name ="a" src="a.html"/></div><div><frame name="b" src="b.html"/></div><div></framset></div><div><br>
</div><div>How to make it work, especially how to achieve inserting something before whole document, when there is no <body> in the document?</div><div><br></div>