On Tue, Dec 04, 2007 at 11:06:02PM +0100, Olivier Berger wrote:
> 
> Whenever twiki was installed, the apache.conf file contains RewriteRules like 
> :
> 
> RedirectMatch /twiki/?$ http://localhost/cgi-bin/twiki/view$1
> RedirectMatch /twiki(/([A-Z].*)?)?$ http://localhost/cgi-bin/twiki/view$1
> 
> In the example above, the address for the host input in debconf question was 
> localhost.
> 
> However, when reconfiguring, the new value input for that host won't be 
> modified in apache.conf :(
> 
> I think the problem comes from the way the file is modified by the postinst 
> script, which does this :
> perl -pi~ -e '$U=q{'"$RET"'}; s{http://your.domain.com}{$U}g;' 
> /etc/twiki/LocalSite.cfg
> perl -pi~ -e '$U=q{'"$RET"'}; s{http://your.domain.com}{$U}g;' 
> /etc/twiki/apache.conf
> 
> This takes for granted that the file initally contains stuff like :
> RedirectMatch /twiki(/([A-Z].*)?)?$ 
> http://your.domain.com/cgi-bin/twiki/view$1
> 
> The substitution regex should look for a RewriteRule and not only the URL 
> base.
> 

Maybe the directives may simply be written as :

 RedirectMatch /twiki/?$ /cgi-bin/twiki/view$1
 RedirectMatch /twiki(/([A-Z].*)?)?$ /cgi-bin/twiki/view$1

As this seems to work (at least in apache 2.2), according to docs at : 
http://httpd.apache.org/docs/2.2/mod/mod_alias.html#redirect :

"The new URL should be an absolute URL beginning with a scheme and hostname, 
but a URL-path beginning with a slash may also be used, in which case the 
scheme and hostname of the current server will be added."

Thus there would be no need to reconfigure that during postinst.

Hope this helps,




-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to