• Dear Pleskians! The Plesk Forum will be undergoing scheduled maintenance on Monday, 7th of July, at 9:00 AM UTC. The expected maintenance window is 2 hours.
    Thank you in advance for your patience and understanding on the matter.

adding a bit of code to pages

O

ott0

Guest
I just got a VPS with plesk, and will be hosting sites for a few of my friends.

I want to add a footer to each page on their sites that says something stupid, like "this sit3 h0sted by th3 1337 d00d consortium" or something. Is there any way to do this in Plesk or apache? Tell the server to add something extra to each page?

Or would I have to use php or something?

thanks a lot
 
Hi,

You can do this using Apache.

Modifying static content using a CGI script
The following directives will cause requests for files with the html extension to trigger the launch of the footer.pl CGI script.

Action add-footer /cgi-bin/footer.pl
AddHandler add-footer .html
Then the CGI script is responsible for sending the originally requested document (pointed to by the PATH_TRANSLATED environment variable) and making whatever modifications or additions are desired.

Of course you could change the .pl to .php and execute a PHP script. For more details see Apache Handler Use docs.

Regards,
Jeff Wickenheiser
 
Back
Top