Hi Hans,
>> RewriteRule ^/Directory(/?)$ /Directory/site/
>> RewriteRule ^/Directory/index.cgi(.*)$ /Directory/site$1
>> RewriteRule ^/Directory/site(.*)$ /Directory/index.cgi$1 [L]
>> <Location /Directory/site>
>> SetHandler perl-script
>> PerlHandler ModPerl::Registry
>> Options ExecCGI
>> </Location>
> This matches the <Location /Directory/site ... > even without doing any
> rewrite and a DirectoryIndex directive could have made index.cgi being
> invoked ... Missed a 'RewriteEngine ON' directive in your snippet, is it
> anywhere?
There is a RewriteEngine ON statement. Please note that 'site' is NOT a
real directory. It is just a name that is used to mask 'index.cgi'. The
script should be either called through 'http://domain.tld/Directory'
or something like <a style='text-decoration: underline;' href="http://domain.tld/Directory/site/document.html" target="_blank">http://domain.tld/Directory/site/document.html</a>
(anything behind site/ is handeled by the cgi script)
>>however when I call it through <a style='text-decoration: underline;' href="http://domain.tld/Directory" target="_blank">http://domain.tld/Directory</a> it isn't!
>
> Show us a snippet of your error_log,
no errors occur when the regarding uris are requested (neither in der
server log nor in the custom error log)
> some more line from rewrite_log might
> come in handy too.
1. When I access 'http://domain.tld/Directory' (NO MOD_PERL)
init rewrite engine with requested uri /Directory
applying pattern '^/Directory(/?)$' to uri '/Directory'
rewrite /Orwell -> /Directory/site
applying pattern '^/Directory/index.cgi(.*)$' to uri '/Directory/site'
applying pattern '^/Directory/site(.*)$' to uri '/Directory/site'
rewrite /Directory/site -> /Directory/index.cgi
local path result: /Directory/index.cgi
prefixed with document_root to /www/k-1/html/Directory/index.cgi
go-ahead with /www/k-1/html/Directory/index.cgi [OK]
2. When I access 'http://domain.tld/Directory/' (NO MOD_PERL)
init rewrite engine with requested uri /Directory/
applying pattern '^/Directory(/?)$' to uri '/Directory/'
rewrite /Directory/ -> /Directory/site
applying pattern '^/Directory/index.cgi(.*)$' to uri '/Directory/site'
applying pattern '^/Directory/site(.*)$' to uri '/Directory/site'
rewrite /Directory/site -> /Orwell/index.cgi
local path result: /Directory/index.cgi
prefixed with document_root to /www/k-1/html/Directory/index.cgi
go-ahead with /www/k-1/html/Directory/index.cgi [OK]
3. When I access 'http://domain.tld/Directory/site/document.html'
(MOD_PERL WORKS)
init rewrite engine with requested uri /Directory/site/document.html
applying pattern '^/Directory(/?)$' to uri '/Directory/site/document.html'
applying pattern '^/Directory/index.cgi(.*)$' to uri
'/Directory/site/document.html'
applying pattern '^/Directory/site(.*)$' to uri
'/Directory/site/document.html'
rewrite /Orwell/site/document.html -> /Directory/index.cgi/document.html
local path result: /Directory/index.cgi/document.html
prefixed with document_root to
/www/k-1/html/Directory/index.cgi/document.html
go-ahead with /www/k-1/html/Directory/index.cgi/document.html [OK]
regards
maros<!-- ~MESSAGE_AFTER~ -->
>> Stay informed about: mod_perl / url rewrite problem