Trying to get a simple test perl script working. Have the following files/folder structure on a shared hosting service:
~/public_html/
- .htaccess
~/public_html/lookup Permissions: "drwxrwxrwx 2 myusername myusername"
- .htaccess
- lookup.pl* Permissions: "-rwxr-xr-x myusername myusername"
The first .htaccess contains:
# disable directory browsing
Options All -Indexes
RewriteEngine on
RewriteBase /
RewriteRule ^(r)$ $1/ [R]
RewriteRule ^(r)/(.*)(\.[a-z]+)$ redirect.php?$1 [L]
RewriteRule ^(r)/(.*)$ redirect.php?$1 [L]
The second .htaccess contains:
RewriteEngine On
RewriteBase /lookup
RewriteCond %{REQUEST_URI} !^/lookup/lookup.pl [NC]
RewriteCond %{REQUEST_URI} !\.(css|png|jpg|gif)$ [NC]
RewriteRule ^(.*)$ lookup.pl/$1 [QSA,NC]
But direct access to: www.mysite.com/lookup/lookup.pl does not work and shows a "500 Internal Server Error"