• Do not register here on develop.twiki.org, login with your twiki.org account.
• Use View topic Item7848 for generic doc work for TWiki-6.1.1. Use View topic Item7851 for doc work on extensions that are not part of a release. More... Close
• Anything you create or change in standard webs (Main, TWiki, Sandbox etc) will be automatically reverted on every SVN update.
Does this site look broken?. Use the LitterTray web for test cases.

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

ItemTemplate
Summary When using Redirect rule in Apache to protect attachments, View.pm routine causes endless loop
ReportedBy JustinCook
AppliesTo Engine
Component

Priority Normal
CurrentState No Action Required
WaitingFor

Edit | Attach | Watch | Print version | History: r3 < r2 < r1 | Backlinks | Raw View |  Raw edit | More topic actions
Topic revision: r3 - 2005-11-17 - CrawfordCurrie
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback