Attempt to deny access to all files except index.pl. First, I deny everything, after which I allow access to index.pl. The following code is working correctly.
Order Allow,Deny
Deny from all
<Files "index.pl">
Order Deny,Allow
Allow from all
</Files>
But after adding the .htaccess file with this content, the following problem appeared: When I try to access mysite.com/( without index.pl), the server says that it is forbidden.
I tried to add DirectoryIndex index.pl, the code became like this:
Order Allow,Deny
Deny from all
<Files "index.pl">
Order Deny,Allow
Allow from all
</Files>
DirectoryIndex index.pl
This did not help me.
What should I write in the file to restrict all files except index.pl and the site will work correctly, without adding /index.plfor the link? Maybe there is another way to do what I want? Thank!
ps: Sorry for my not very good english.