PDA

View Full Version : htaccess ErrorDocument - redircting to perl script - how?


silver
05-05-2001, 06:05 PM
Hi All,


I need some help if poss.

I need to call a perl script from the error doc directive in the .htaccess file

somthing like

ErrorDocument 404 /cgi-bin/test.cgi

I cant get it to work :\

it works fine if I do the full http:// path ie

ErrorDocument 404 http://www.mydomain.com/cgi-bin/test.cgi

but the problem with using the full path is that it changes the url in the users browser window - I need to script call to be hidden..

I also dont want to use 404.shtml etc because I need to use perl script.

I think the problem is somthin to do with me not getting the correct path to the script, as the script works fine if I call it direct. Ive tried putting in the full path to it ie /home/mydomainname/public_html/cgi-bin/test.cgi - but that doesnt work either :\

Any help gratefully received :)

Sil

petesmc
05-05-2001, 06:44 PM
try removing the slash at the beginning of the path.

silver
05-06-2001, 03:39 AM
Hi petesmc,

This is bizarre, I now have

ErrorDocument 404 /cgi-bin/test.cgi

and its working, perhaps I had some type of browser caching.

Thanks for you input :)

Sil