Insert the following rule into apache configuration to protect attachements:
RewriteEngine on
RewriteRule ^/twiki/pub/TWiki/(.*)$ /twiki/pub/TWiki/$1 [L,PT]
RewriteRule ^/twiki/pub/([^\/]+)/([^\/]+)/([^\/]+)$ /twiki/bin/viewfile/$1/$2?filename=$3 [L,PT]
This is the diff of original View.pm and the modified version to work:
# diff View.pm.orig View.pm
359c359
< if( $rev && $rev ne $topRev ) {
---
> # if( $rev && $rev ne $topRev ) {
372c372
< }
---
> # }
379,381c379,381
< my $host = $session->{urlHost};
< $session->redirect( $host.$TWiki::cfg{PubUrlPath}.
< "/$webName/$topic/$fileName" );
---
> # my $host = $session->{urlHost};
> # $session->redirect( $host.$TWiki::cfg{PubUrlPath}.
> # "/$webName/$topic/$fileName" );
It appears the View.pm method is attempting to optimize by not outputting via script if current version is the latest version. This ends up in an endless loop of redirects within Apache.
This View.pm is from a dakar-beta3 installation. After diff of View.pm from DEVELOP it appears the functionality would be the same, although not verified.
This is a duplicate of a known problem that has been fixed (I think it was fixed in Beta 4, though I'm not sure. It's certainly fixed in SVN).
CC