[pmwiki-devel] RedirectExternal

2 views
Skip to first unread message

adam overton

unread,
May 31, 2011, 6:37:18 PM5/31/11
to pmwiki...@pmichaud.com
hi friends
i was in a hurry and in need of a markup that can redirect to external sites, but didn't find any on the cookbook, and so made the following. before i add it to the cookbook, just wondering if anyone knew of a recipe that this might be duplicating?
thanks,
adam


# Redirect to an External Site with the markup (:RedirectExternal http://extWebsite.com:)
Markup('RedirectExternal','>fulltext',
'/\\(:RedirectExternal (.+):\\)/e',
"RedirectExternal('$1')");

function RedirectExternal($url) {
header('Location: '.$url);
exit();
}


_______________________________________________
pmwiki-devel mailing list
pmwiki...@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-devel

Randy Brown

unread,
May 31, 2011, 7:07:51 PM5/31/11
to pmwiki...@pmichaud.com
The closest I know is http://www.pmwiki.org/wiki/Cookbook/RedirectIntermap which allows redirects to any location if you set the configuration to $EnableRedirectExternal = 0;

On May 31, 2011, at 5:37 PM, adam overton wrote:
> just wondering if anyone knew of a recipe that this might be duplicating?

adam overton

unread,
May 31, 2011, 7:47:00 PM5/31/11
to Randy Brown, pmwiki...@pmichaud.com

ah, i see. not the most direct route, but i see how this might be safer by defining an InterMap.
thanks randy,
adam

On 31 May 2011, at 4:06 PM, Randy Brown wrote:

> The closest I know is http://www.pmwiki.org/wiki/Cookbook/RedirectIntermap which allows redirects to any location if you set the configuration to $EnableRedirectExternal = 0;
>
> On May 31, 2011, at 5:37 PM, adam overton wrote:

>> just wondering if anyone knew of a recipe that this might be duplicating?
>

adam overton

unread,
May 31, 2011, 8:02:29 PM5/31/11
to Randy Brown, pmwiki...@pmichaud.com
oh, wait, it does work naturally without having to declare an InterMap, via
(:redirect 'http://extSite.com':)
coool.
thx again
a


On 31 May 2011, at 4:06 PM, Randy Brown wrote:

> The closest I know is http://www.pmwiki.org/wiki/Cookbook/RedirectIntermap which allows redirects to any location if you set the configuration to $EnableRedirectExternal = 0;
>
> On May 31, 2011, at 5:37 PM, adam overton wrote:

>> just wondering if anyone knew of a recipe that this might be duplicating?
>

Reply all
Reply to author
Forward
0 new messages