views:

22

answers:

2

Greetings,

links redirecting to other website not working....

Am trying to display member's website as a link, which is retrieved from database, as link, when clicked should redirect or go to that website. But members website url is getting appended to the end of the site base url as shown below .

[a] href="www.mysite.com/member/details/">Click for Web Site[/a]

i want this to be as

[a] href="">Click for Web Site[/a]

the code , in phtml:

[a] herf="data['website']">Click for Web Site[/a]

how to avoid baseurl getting prepend to the link.

+1  A: 

www.mysite.com/member/details/ is not a valid URL - this needs to be http://www.mysite.com/member/details/ for the link to work as you are expecting. Since the link doesn't start with a URL scheme, the browser (not ZF) is assuming the link is relative to the current page which is why you are having trouble.

I would suggest checking the URLs entered by your members when they are saved, and prepending http:// to the front of them if necessary. Alternatively you could write a quick view helper to add that in when showing the links on the frontend.

Tim Fountain
A: 

thansk Tim

got working by adding http:// to the link.

adithya