prepend a string on some URL's but not others

General discussions about Advanced Find and Replace
Post Reply
robj
Posts: 1
Joined: Sat Feb 25, 2006 8:50 pm

prepend a string on some URL's but not others

Post by robj »

I want to take every link in our website that points to external domain and prepend it with http://www.ourcompany.com/html/home/exit.asp?

so the source would look like:

Code: Select all

<a href="http://www.someothercompany.com/">Some Link</a>


to:

Code: Select all

<a href="http://www.ourcompany.com/html/home/exit.asp?http://www.someothercompany.com/">Some Link</a>


But I obivousily don't want to prepend it to internal links. Is there a way to do that?

Post Reply