Sikkandar

Put the script in a folder that is not directly accessible on the website, eg:

         Web Server
         |
         ___ cgi-bin/test.pl
         |
         ___docroot/home.htlm

If site visitors do not have rights to anywhere but docroot they will not 
be able to get at your script.

Ian

At 15:17 14/04/2001 +0300, you wrote:
>Dear Friends,
>
>I am using Apache webserver 1.3.19. I have added ".htaccess" into the root 
>directory i.e ../htdocs, so that the user required Authentication to 
>access the files under this directory. Actually one of the html file calls 
>the ../cgi-bin/test.pl script (<FORM Action="/cgi-bin/test.pl" 
>METHOD=POST>). Once the form is submitted, the test.pl script will be 
>executed and print the result into the browser.
>
>The problem is, I can able to directly call the script without any 
>authentication like  http://my-server/cgi-bin/test.pl.NA?userid=sikkandar 
>. I do not want anyone to access the script directly like above. Does any 
>one help me, how do I restrict this.
>
>Thanks in advance.
>
>Regards,
>
>Sikkandar.

Reply via email to