[pmwiki-users] Conditional external redirect

Peter Bowers pbowers at pobox.com
Fri Dec 16 03:41:32 CST 2011


On Fri, Dec 16, 2011 at 12:15 AM, kirpi at kirpi.it <kirpi at kirpi.it> wrote:
...
> to show a temporary
>  <h2>We'll be back in a week or so…</h2>
> page, I thought that I could place
>  (:if ! auth edit:)
>  (:redirect http://example.com/we_ll_be_back_soon.html status=307:)
>  (:ifend:)
> in all the 30 wiki pages which are now online (it would take a just
> five minutes).

I'll leave it to others to comment on the markup.  But 2 alternate
solutions which may be of interest:

(1) Make your "We'll be back in a week or so" on an internal wiki page
and do all your redirects to that -- thus no external redirect is
necessary
(2) Don't do it in markup at all but in config.php create your
appropriate conditional statement and then issue the header() call
directly.  That also avoids the hassle of having to edit 30 pages...

There's probably good reasons not to use those approaches, but I tho't
I'd throw them out anyway just in case it simplifies things...

-Peter



More information about the pmwiki-users mailing list