+ Reply to Thread
Results 1 to 3 of 3

Thread: Removing domain name from URL link

  1. #1
    lexirox is offline x10Hosting Member lexirox is an unknown quantity at this point
    Join Date
    Apr 2010
    Posts
    3

    Removing domain name from URL link

    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.

  2. #2
    lemon-tree's Avatar
    lemon-tree is offline x10 Minion lemon-tree has a spectacular aura about
    Join Date
    Nov 2007
    Posts
    1,420

    Re: Removing domain name from URL link

    Make sure your $url variable has http:// at the beginning, otherwise it will look at the root of the current domain.

  3. #3
    lexirox is offline x10Hosting Member lexirox is an unknown quantity at this point
    Join Date
    Apr 2010
    Posts
    3

    Re: Removing domain name from URL link

    Beautiful! It works. Thank you!

+ Reply to Thread

Similar Threads

  1. removing domain
    By tyyymyshoe in forum Free Hosting
    Replies: 3
    Last Post: 05-01-2010, 09:32 PM
  2. Problem removing the Addon Domain
    By mohTareq in forum Free Hosting
    Replies: 2
    Last Post: 04-26-2010, 09:52 PM
  3. There was a problem removing the Addon Domain.
    By yassine123 in forum Free Hosting
    Replies: 2
    Last Post: 03-31-2010, 02:26 PM
  4. Removing "x10hosting.com" from domain name
    By supes83 in forum Free Hosting
    Replies: 2
    Last Post: 03-19-2010, 12:36 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers