I am not sure if this is the right forum to put this in, but I am trying to use htaccess to put a footer on all sites created on one of my ispconfig servers, howerver, each way I write the htaccess file gives me a 500 error, an error refering to pear, or has no effect on the index.html or index.php Any ideas on that that may work without any major changes to the server?
It's a shame that php_value auto_prepend_file and php_value auto_append_file work only with php scripts (You can append text files to).
lesxek, as you see in the second example I used a php header and footer as well. (they need a smiley with a gun to its head for frustration). Is there a way to include a footer in all formats, php, html. htm, etc. If I get this working, I want to set up a module, that turns on and off forced ads for clients.
If i can figure out how to do this with htaccess I can write the module without a problem. Its just frustrating the hell out of me trying to get htaccess working.
nope nothing that matters, I am assuming its with the AllowOverride directive, but i added allowoverride all to the apache directives
Ok, I have the htaccess working in the /*/web folders by adding the AllowOverride Options tag, but now I need either to enable htaccess in the /var/www folder or to find a way for it to create an htaccess file with each new web. Any ideas? Figured it out: I created a folder called ads in var/www/ads placed my footer.php there and placed a blank.php there created an htaccess file in /var/www containing php_value output_buffering 4098 AddType application/x-httpd-php htm AddType application/x-httpd-php html php_value auto_append_file '/var/www/ads/footer.php' I enabled php server wide, as I give all my clients php anyway, in apache2.conf under the <Directory /var/www/sharedip>...</Directory> <Directory /var/www> Options +Includes -Indexes AllowOverride None AllowOverride Indexes AuthConfig Limit FileInfo Options Order allow,deny Allow from all <Files ~ "^\.ht"> Deny from all </Files> </Directory> Also add options in the allowoverride in /var/www/*/web and Allow from root in <Files ~ "^\.ht"> Allow from root Deny from all </Files> to disable the ads on a particular site create an htaccess file and place it in the web folder of the client php_value output_buffering 4098 AddType application/x-httpd-php htm AddType application/x-httpd-php html php_value auto_append_file '/var/www/ads/blank.php'