This turned out to be quite simple, but I wanted to post a solution for the record...<div><br class="webkit-block-placeholder"></div><div>There is a useful function called Redirect() in PmWiki's core functions. To use it, just call Redirect($pagename).
</div><div><br class="webkit-block-placeholder"></div><div>For example... In a group.php config file I can include:</div><div><br class="webkit-block-placeholder"></div><div><div>$ref = $_SERVER["HTTP_REFERER"];
</div><div>$pattern = '/collection=([^\&]*).*item=([^\&]*)/';</div><div>if (preg_match($pattern,$ref,$matches)) {</div><div><span class="Apple-tab-span" style="white-space: pre; ">        </span>$collection = $matches[1];
</div><div></div><div><span class="Apple-tab-span" style="white-space: pre; ">        </span>$item = $matches[2];</div><div></div><div><span class="Apple-tab-span" style="white-space:pre">        </span>Redirect(MakePageName("","Discuss.$collection$item"));
</div><div><div>}</div><div>Redirect("Discuss.Sorry");</div><div><br class="webkit-block-placeholder"></div><div>...Eric</div></div><br><div><span class="gmail_quote">On 11/21/07, <b class="gmail_sendername">Eric Celeste
</b> <<a href="mailto:efc.dev@gmail.com">efc.dev@gmail.com</a>> wrote:</span><blockquote class="gmail_quote" style="margin:0;margin-left:0.8ex;border-left:1px #ccc solid;padding-left:1ex"><div>I'd like to have PmWiki choose which page to show based on the referrer to PmWiki without depending on external rewriting of the addresses involved. For example:
</div><div><br> </div>
<div> ... if my wiki is "<a href="http://target.com/pmwiki.php" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://target.com/pmwiki.php</a>", </div><div><br> </div><div> ... a link on "
<a href="http://source.com/foo" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
http://source.com/foo</a>" to "<a href="http://target.com/pmwiki.php?n=Bob" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://target.com/pmwiki.php?n=Bob</a>" </div><div> would end up retrieving "Bob/foo"
</div><div><br>
</div><div> but </div><div><br> </div><div><div> ... a link on "<a href="http://source.com/bar" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://source.com/bar</a>" to "<a href="http://target.com/pmwiki.php?n=Bob" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
http://target.com/pmwiki.php?n=Bob</a>" </div><div> would end up retrieving "Bob/bar" </div><div><br> </div><div>I know how to get and parse the referrer in PHP, but I am not clear on how to get PmWiki to redirect its efforts toward showing a page other than the one it was called to show.
</div><div><br> </div><div>Any quick hints as to how to go about this in the Bob.php group config page?</div><div><br> </div><div>Thanks,</div><div>...Eric</div>
<div><br> </div></div>
</blockquote></div><br> </div>