[pmwiki-users] Redirection from action handler

Joachim Durchholz jo at durchholz.org
Fri Jul 1 13:34:18 CDT 2005


Hi all,

how do I redirect to a wiki page from an action handler?

I want to send a mail from an action. That may succeed or fail.

I want to make PmWiki show different pages depending on success or failure.


It seems that
   header("HTTP/1.1 303 See Other");
   header("Location: $ScriptUrl?n=$RedirectedName");
will do the trick - any caveats here?
(Say, problems with session variables, or PmWiki outputting text before 
or after handling an action, or any obvious blunders in the above code.)

Also, how would I generate a URL that looks like the ones the users are 
used to, i.e. with slashes instead of ?n and . if $EnablePathInfo is set?

Regards,
Jo



More information about the pmwiki-users mailing list