htaccess correct?
Although I can run test.cgi fine but my perl 开发者_开发百科all doesn't work, is this htaccess correct:
AddHandler cgi-script .cgi
Options +ExecCGI
IndexIgnore *
DirectoryIndex myapp.cgi
RewriteEngine on
RewriteRule ^$ myapp.cgi [L]
RewriteRule ^/$ myapp.cgi [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ myapp.cgi/$1
Turns out that mediatemple's PERL version is 5.8.4 and my app is only compatible with 5.8.8+.
What kind of error is Apache returning? If it looks like permissions, try adding:
Order allow,deny
Allow from all
before the RewriteEngine line and see if that helps.
Also, unless you're sure that your rewrite rules are correct I'd comment them out until you see that your script runs as it should. If the script won't work without them then replace it for testing purposes with something really simple just to make sure that Apache's working correctly.
精彩评论