Forum Moderators: phranque

Message Too Old, No Replies

Handler for specific file (not extension)

         

Haran78

1:55 pm on Aug 2, 2011 (gmt 0)

10+ Year Member



Hi all,
this forum has been of great help for me in the past and I'm now writing my first post here.

Here is my problem.
I have to replace an old webservice in perl (cgi) and I've wrote a new php script. This webservice receives xml data via post from different sources and I need to keep the same url.
The old script is located in [mysite.com...]
the new one in located in [mysite.com...]

In the virtualhost I've set the Handler for cgi files to cgi-scripts but, since I need to keep the same url I've replaced engine1.cgi with engine2.php renamed to engine1.cgi
Unfortunatly Apache tries to execute my php script using Perl generating an error.
If I set the Handler for cgi file to php5-scripts, my php file works, but, all the other perl scripts in the same directory wont.

I unsuccessfully tried with redirects and symbolic links too.

Do you have any idea on how to solve my problem?
Can I set an Handler for a specific file?

phranque

1:33 am on Aug 3, 2011 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



welcome to WebmasterWorld, Haran78!

i would try using the Files or Filesmatch scope limiting directive with SetHandler.
these are all Apache Server core directives:
http://httpd.apache.org/docs/2.0/mod/core.html [httpd.apache.org]

Haran78

7:44 am on Aug 3, 2011 (gmt 0)

10+ Year Member



It worked!

Thanks a lot :)