ironman32 Posted April 12, 2009 Share Posted April 12, 2009 I have a series of links that I am using but intead of going to the link when its clicked, the link is added to my own url. for example The page I am on is http://www.phpfreaks/com. There is a link on this page to go to http://www.webhostfreaks.com. when I click on the link it gets added to the current url e.g. http://www.phpfreaks/com./http://www.webhostfreaks.com. How can I get the links to take me straight to the page? Here are the links I am using. $input = array("<a href= \http:www.muscleandstrength.com/exercises/seated-dumbbell-press.html/> Seated dumbell press</a>", "<a href= \http://www.muscleandstrength.com/exercises/seated-arnold-press.html\>Seated Arnold press</a>", "<a href=\http://www.muscleandstrength.com/exercises/standing-dumbbell-press.html\>Standing dumbell press</a>", "<a href=\http://www.muscleandstrength.com/exercises/standing-arnold-press.html\>Standing Arnold Press</a>"); Any help would be appreciated. Thank you Link to comment https://forums.phpfreaks.com/topic/153771-solved-links-problem/ Share on other sites More sharing options...
DarkSuperHero Posted April 12, 2009 Share Posted April 12, 2009 $input = array("<a href='http:www.muscleandstrength.com/exercises/seated-dumbbell-press.html'/> Seated dumbell press</a>", "<a href='http://www.muscleandstrength.com/exercises/seated-arnold-press.html'\>Seated Arnold press</a>", "<a href='http://www.muscleandstrength.com/exercises/standing-dumbbell-press.html'\>Standing dumbell press</a>", "<a href='http://www.muscleandstrength.com/exercises/standing-arnold-press.html'\>Standing Arnold Press</a>"); just had a mysterious \ before http:// Link to comment https://forums.phpfreaks.com/topic/153771-solved-links-problem/#findComment-808162 Share on other sites More sharing options...
jackpf Posted April 12, 2009 Share Posted April 12, 2009 .htaccess? RewriteRule ^/(.*?)$ $1 [R] Untested. Might work. Something like that though.[/code] Link to comment https://forums.phpfreaks.com/topic/153771-solved-links-problem/#findComment-808165 Share on other sites More sharing options...
ironman32 Posted April 12, 2009 Author Share Posted April 12, 2009 Thanks DarkSuperHero. Problem solved. Link to comment https://forums.phpfreaks.com/topic/153771-solved-links-problem/#findComment-808170 Share on other sites More sharing options...
jackpf Posted April 12, 2009 Share Posted April 12, 2009 Completely misunderstood what was going on there Link to comment https://forums.phpfreaks.com/topic/153771-solved-links-problem/#findComment-808177 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.