1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Link problem - Please help

Discussion in 'HTML & JavaScript' started by ddederick, Mar 8, 2016.

  1. ddederick

    ddederick Jr. VIP Jr. VIP Premium Member

    Joined:
    Nov 22, 2012
    Messages:
    584
    Likes Received:
    436
    Location:
    The Source Code
    Hi guys
    I have this crazy problem and I'm absolutely unable to solve it myself.

    There's a link in my website which leads to another domain, however when you click it it opens http://www.mydomain.com/"http://www.anotherdomain.com" and shows 404.

    I'm not sure how to tell Wordpress that it's not a part of my site. The link should be set correctly <a href="http://www.anotherdomain.com">link</a> so the problem is somewhere else...

    I'd really appreciate any input..Thank you
     
  2. Conor

    Conor Elite Member

    Joined:
    Nov 7, 2012
    Messages:
    3,577
    Likes Received:
    5,954
    Gender:
    Male
    Location:
    South Africa
    Home Page:
    Are you sure you included the http:// part in your href?
     
  3. loedown

    loedown Jr. VIP Jr. VIP

    Joined:
    Jun 29, 2009
    Messages:
    1,607
    Likes Received:
    504
    Home Page:
    This should like it might be the problem, however there is no telling without looking at it. It could also be an issue with the .htaccess.
     
  4. ddederick

    ddederick Jr. VIP Jr. VIP Premium Member

    Joined:
    Nov 22, 2012
    Messages:
    584
    Likes Received:
    436
    Location:
    The Source Code
    Yes I included http://. That's the strange thing. Does anybody know a command to force website not to add its own address before the target location?
     
  5. loedown

    loedown Jr. VIP Jr. VIP

    Joined:
    Jun 29, 2009
    Messages:
    1,607
    Likes Received:
    504
    Home Page:
    The a href="http address" is the syntax. Is this a post or a link in a footer or something?
     
  6. kickthat

    kickthat Jr. VIP Jr. VIP

    Joined:
    Sep 18, 2014
    Messages:
    412
    Likes Received:
    500
    Gender:
    Male
    Location:
    UK
    This is almost guaranteed to be incorrectly coded. Either take a really careful look at each character in the code for the link or copy and paste it here changing ONLY the domain name.

    I guess it's possible that if you have a base tag set in the header it's messing with this? But I'm pretty sure it shouldn't be doing this if you are specifying http
     
  7. ddederick

    ddederick Jr. VIP Jr. VIP Premium Member

    Joined:
    Nov 22, 2012
    Messages:
    584
    Likes Received:
    436
    Location:
    The Source Code
    Guys, I solved it using redirects. The links leads now to mydomain.com/redirect which sends user to another domain. Really don't know where the problem is but this is working. Thanks to all
     
  8. tompots

    tompots Elite Member Premium Member

    Joined:
    Dec 11, 2011
    Messages:
    4,371
    Likes Received:
    3,964
    Gender:
    Male
    Occupation:
    Full Time Bot Developer
    Location:
    Automation Alternatives
    Home Page:
    Make sure you making your hyper links in the format below

    Code:
    <a href="http://www.blackhatworld.com/">black hat world</a>
    
    You can find everything you need at the link below.
    http://www.w3schools.com/html/html_links.asp
     
  9. mtinra

    mtinra Newbie

    Joined:
    Jan 15, 2016
    Messages:
    15
    Likes Received:
    1
    Location:
    BHW
    This is not the normal way Wordpress print out the links, do you have other plug-in installed? and could you try to change the theme to normal themes which come with wordpress? if the problem gone then then problem is your theme.
     
    Last edited: Mar 11, 2016