How to create htaccess file correctly?

Viewed 15

I am trying to run a script via apache on a shared linux server, like

#!/usr/bin/perl
print "Content-type: text/html\n\n";
foreach $i (keys %ENV) {
  print "$i $ENV{$i}\n";
}

But I want to run it via. a symlink created like this

ln -s printenv.pl linkedprintenv.pl

It runs fine directly but I got a 500 server error when executing via the symlink from a web browser. I understand the solution may be to create a .htaccess file containing

Options +FollowSymLinks

but I tried and that didn't work. Is there extra configuration needed for that single line htaccess file to take effect?

0 Answers
Related