1 Answer
1

Which seems odd to me. What is add-footer? What is script.pl? That seems to be an example from the Apache site that would cause requests for files with the html extension to trigger the launch of the footer.pl CGI script. Why would you need that?

EDIT: Since the original poster does want the add-footer functionality—now called backButton—it seems that this configuration would be the best way to handle; combine what I am doing above with with the original poster posted to begin with:

ANOTHER EDIT: Seems like there was a typo the first time with me setting php instead of .php for AddHandler php5-script .php. But also, try this instead using application/x-httpd-php5 instead of php5-script:

Sorry, your right. I can see where you are coming from. This is indeed of the Apache site but I forgot to change it to my situation. The name add-footer in my case is backButton and /script.pl is /backButton.cgi (which is a bash script). I have edited the post above. What I am trying to do is to add some html content to every .html, .htm and .php page in a specific directory. The catch is I can't edit the pages. The solution above does exactly what I want for .html and .htm pages but not .php pages. The .php page itself runs fine but the extra content is not added.
– JamesStewyMay 5 '14 at 6:50

@JamesStewy Oh, okay. Then look at my latest edit. Combine what I am doing with what you are attempting to do & it should work.
– JakeGouldMay 5 '14 at 14:08

So, I added AddHandler php5-script php to my example in the original post and it didn't make a difference. The php page loads but the html isn't added in.
– JamesStewyMay 6 '14 at 1:51

Hmmm… How about AddHandler application/x-httpd-php5 .php Look at my edit. Made a typo previously as well.
– JakeGouldMay 6 '14 at 2:02