UserName
Thu 17th Aug '00, 5:02am
Hi all. I need help. I have 6000+ .shtml pages on one of my sites that use server side includes to bring banners into each page. The include is a simple little line that goes something like this:
<!--#include virtual="/centralad/ssirand.cgi?REGION=navbot"-->
I stopped using CentralAd a while back, and I wrote a small CGI script (and named it ssirand.cgi) that brings in banners from an external rotation service. So far so good.
Now I want to start using a PHP banner rotation script. But, I don't want to have to go through 1000's of pages and make changes to each one and then re-upload them. I thought that a simple solution would be to make all of the .CGI files in the CentralAd directory into PHP files, then when I called ssirand.cgi, I would actually be calling a PHP file instead of a CGI file. I tried using an htaccess with the line:
AddType application/x-httpd-php .cgi
But, it didn't work. If you change the .cgi to .html in the above, it does work to change my .html files into PHP files. I am wondering if it has something to do with the way the server is set up to handle .CGI files. I'm thinking that maybe I need to have a command in my .htaccess to tell the server that .CGI files in this directory are not really CGI, they are just PHP. I am lost for now and would appreciate any suggestions on how I might do this.
Thanks and take care!
<!--#include virtual="/centralad/ssirand.cgi?REGION=navbot"-->
I stopped using CentralAd a while back, and I wrote a small CGI script (and named it ssirand.cgi) that brings in banners from an external rotation service. So far so good.
Now I want to start using a PHP banner rotation script. But, I don't want to have to go through 1000's of pages and make changes to each one and then re-upload them. I thought that a simple solution would be to make all of the .CGI files in the CentralAd directory into PHP files, then when I called ssirand.cgi, I would actually be calling a PHP file instead of a CGI file. I tried using an htaccess with the line:
AddType application/x-httpd-php .cgi
But, it didn't work. If you change the .cgi to .html in the above, it does work to change my .html files into PHP files. I am wondering if it has something to do with the way the server is set up to handle .CGI files. I'm thinking that maybe I need to have a command in my .htaccess to tell the server that .CGI files in this directory are not really CGI, they are just PHP. I am lost for now and would appreciate any suggestions on how I might do this.
Thanks and take care!