I'm running two instances ('test' and 'twiki') of Dakar (4.0.1) on the same system. A redirect command in httpd.cond (
RedirectMatch permanent /$
http://example.com/twiki/bin/view
) also redirects the 'test' instance group add to the twiki instance then errors out.
I don't see this behavior with anything except adding a group at this point --
http://example.com/test/bin/view/Main/TWikiGroups
redirects to
http://example.com/twiki/bin/view/Main/TWikiGroups
I don't understand what you are reporting here. Are you asking for help with Apache redirects? I would suggest you refer to the Apache documentation in this case, or failing that to their newsgroups. If you are trying to report a reproducable TWiki bug, please give clear instructions here how to reproduce the bug.
Discarded, pending a clearer report.
CC
WOW. Actually no, not describing a problem with Apache Redirect.
The Redirect line in the httpd.conf file works as expected. It redirects
http://example.com
->
http://example.com/twiki/bin/view
HOWEVER, I have two twiki instances running on the system -- one named 'twiki' and one named 'test' (for testing purposes, installing plugins, etc). That one works as expected except for one minor thing......when trying to add a group through
http://example.com/test/bin/view/Main/TWikiGroups
I enter the new group name, hit the 'Add' button and get redirected to an error on
http://example.com/twiki/bin/view
(the instance named 'twiki') -- redirected to the other instance than the one I was using.
When I comment out the redirect line in httpd.conf and restart the web server all behaves as it should.....meaning that the group is created on the correct instance of the twiki ('test' in this case). It
appears to me that it would be a form problem in twiki perhaps or something else within twiki that is trying to go to 'http://example.com' (URLHOST) the appending the path once it goes to the URLHOST -- the URLHOST in this case redirects to the production twiki, thus ignoring the actual instance I am testing ('test' in this case).
Is this more clear? It is not an apache error or problem.
This seems to be fairly significant if you have people running multiple instances of twiki on one system and using a redirect to guide to the primary instance.
Sorry, Dana, but CC is right - this
is a problem with your Apache redirection.
Your RedirectMatch directive will redirect
every URL ending in a slash to
http://example.com/twiki/bin/view
. Just try
http://example.com/manual/
- this should in a conventional Apache redirect to the user's manual. Bet you get /twiki/bin/view ?
When creating a group, the form has an action ending in a slash:
<form action="%SCRIPTURLPATH{"edit"}%/%WEB%/" method="get">
...and this gets redirected according to your RedirectMatch directive, whatever was in %SCRIPTURLPATH% before. It is just a coincidence that most TWiki URLs do not end in a slash if they are passing
topic
as a query parameter.
You want to write
RedirectMatch permanent ^/$ http://example.com/twiki/bin/view
...or to venture to using
mod_rewrite
if you are planning more complicated stuff. So I dare to discard the item again.
(BTW, after testing that my corrected RedirectMatch does what I thought it should, I decided to keep it, since on my localhost I'm using TWiki as PIM)
TWiki:Main.HaraldJoerg