Hello, I'm having a problem with a complex link that strangely doesn't work. The link is a long special character-containing link (of course, contains "=", "?") etc... It directs to a kind-of-a shopping cart software. It's for a "buy" button... When copy-pasted, it works! No issues, works fine... But... when I set the link as anchor for a "buy button", then it doesn't work! I give the "a href" the entire link that starts with "http://", but when clicked, the "http://" disappears and only starting with the "www." appears the rest of the link and gives error. I tried redirection. I'm unsure whether to try with .php scripts as well... I can't seem to make the button point to the proper "http://www.blabla....................." (very long) address. Of course, the address is on our site. Any ideas?
It's impossible to help directly without seeing your code. But you can probably diagnose the problem yourself by using the "View Source" option in your browser to see the actual HTML code being sent to the user. You should then be able to see where the <a>nchor tag is malformed.
It's a long link, overall it's not the link itself that's relevant... http://www.shinywatchstore.com/kmg/....pgateway.com/&fn1=p0459852.pdf&desc1=sample& copy-pasted into our system it works... if I link an HTML button to it, then on click it cuts the "http://" part off and then the link doesn't work. I tried adding the link "as is" to the "href", but on click, (as explained above) it doesn't work... even though it's the same link, the click shreds the beginning off! Tried redirecting with a jump page, that gave me a 404 error. Very weird. Seems like copy-paste is the only way it works.
But obviously the URL is getting garbled once it passes through whatever you're doing with it. That's why View Source can help you understand what's wrong. Using an image in a link shouldn't affect the <a>nchor tag, but perhaps certain characters are getting translated or escaped in a way you aren't expecting as you change your code. There's no way for anyone here to tell without seeing the final HTML code, so I'm suggesting you do it yourself.
Well, the anchor tag is plain and simple, remains the same even if I check the page source. Upon execution (click) it loses the "http://" - which doesn't appear in the address bar, so the page doesn't load and this message appears: "Sorry, this is an invalid request" But if I copy-paste the entire code into the address bar, it seems to work. Could there be an .htaccess redirection from the "http://" or some other sort of truncation? I thought of this, but I guess not. Otherwise the copy-paste wouldn't work either.
make redirection page (html page is easiest) for example redir.html use simple code bellow and put some where in your website <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>Please Wait ...</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <meta http-equiv="Refresh" content="0; url=[COLOR="#FF0000"][B]http://www.shinywatchstore.com/kmg/purchase.php?url=http://56.f05g6h8.bkk.pgateway.com/&fn1=p0459852.pdf&desc1=sample&[/B][/COLOR]"> </head> <body bgcolor="#333333"> </body> </html> Code (markup): then point your image into the page <a href="redir.htm locationl"><img src="your image location"></a>
make redirection page (html page is easiest) for example redir.html use simple code bellow and upload it some where in your website <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>Please Wait ...</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <meta http-equiv="Refresh" content="0; url=[COLOR="#FF0000"][B]http://www.shinywatchstore.com/kmg/purchase.php?url=http://56.f05g6h8.bkk.pgateway.com/&fn1=p0459852.pdf&desc1=sample&[/B][/COLOR]"> </head> <body bgcolor="#333333"> </body> </html> Code (markup): then point your image into the page <a href="redir.htm locationl"><img src="your image location"></a>
As rainborick said, without seeing the CODE -- as in the ANCHOR and most of the text around it -- to say what's going wrong. An unclosed double quote, mismatched encoding, failure to escape your ampersands in a XML doctype, XHTML 1.1 which is not real world deployable, there are hundreds of possible causes and you're asking for us to give you an answer with less information than we could see peeping through a keyhole. ... and I'm shocked to see people suggesting a pointless idiotic redirect as the 'answer'... Herpaderp. Though... try losing the trailing ampersand. It serves no purpose.
Hi.. I have seen your problem and within 2-3 tries I figured out that URL which you are trying to access... "http://www.shinywatchstore.com/kmg/purchase.php" is not accessible in any way.... So how is that possible to drive a car without wheels