Forum Moderators: phranque
trying to reduce server load on our site, i am experimenting with generating static html pages from a php script. my mod_rewrite looks like this and appears to work well:
RewriteCond %{REQUEST_FILENAME}!-s
RewriteCond %{REQUEST_FILENAME}/index.html!-s
RewriteCond %{REQUEST_URI}!^/static_html/
RewriteRule ^(.*)$ /static_html/$1 [L]
RewriteCond %{REQUEST_FILENAME}!-s
RewriteCond %{REQUEST_FILENAME}/index.html!-s
RewriteRule ^(.*)$ html.php/$1 [PT,L]
if a request for a static page is not met, the html.php script runs and generates it for the next time.
the problem is some of my server headers get lost in the process. namely the Last Modified date which i sent manually via the php script.
i assumed apache would send the last modified date automaticallybecause it is accessing a normal static html page, but this is not the case?
any clues?
many thanks!
can't for the life of me find out how to disable the AddHandler directive for a subdirectory.
in my /doc_root i have:
AddHandler application/x-httpd-php .htm .html
i am generating static pages in /doc_root/static_html/
so i need a way to not parse the html pages as php in this subdirectory.
i have tried a
<directory>
allowoveride none
but this doesn't work. i have tried duplicating the addhandler line wihtout the .htm .html, but this doesn't work either...?
much appreciate the help