[Pmwiki-users] Link Formatting for External URLs

M Schweitz matt
Mon Mar 1 11:53:56 CST 2004


Hi all,

I have a question about customized linking for certain (external) URL's. 

I understand that I can modify the html output for external links using the
$UrlLinkFmt variable in my config.php.

For example, if I wanted to pass all external url's thru a redirect script,
I could do:

$UrlLinkFmt = "<a class='urllink'
href='http://www.mydomain.com/redirect.pl?target=\$Url'>\$LinkText</a>";

But what if I wanted to exempt certain URLs from this redirect script? Can
anyone help with the regex or code that would allow me to exempt, say all
URLs that are on my server already (those URLs beginning with
'http://www.mydomain.com)?

Thanks for your time and your help in supporting a great wiki!
~Matt



More information about the pmwiki-users mailing list