Removing domain name from URL link

lexirox

New Member
Messages
3
Reaction score
0
Points
0
I'm trying to figure out how to remove the domain name from a link that opens a new window.
I'm doing an echo of a sprint variable:

(ie URL I want to be sent to: $url="www.my_other_url")

//create a link that opens a new window with the target URL displayed
$variable .= sprint("<a href=\"%s\" target=\"_blank\">$s</a>...", $url, $url);

The link opens a new window, but with the new opened URL being: "http://www.my_original_domain.com/www.my_other_url.com"

how do I go about removing the original domain name from the opened window URL?
That way it actually takes you to:

"htpp://www.my_other_url.com"


Thank you in advance. Let me know if I need to clarify more.
 

lemon-tree

x10 Minion
Community Support
Messages
1,420
Reaction score
46
Points
48
Make sure your $url variable has http:// at the beginning, otherwise it will look at the root of the current domain.
 
Top