hello I want to do some thing like this; Say im having a website called www.mysite.com In there , it contains links to another site ; Ex: contain a link called "OTHER" to www.othersite.com Normally, when you click the link OTHER it will go to this link called othersite.com I want to stop this; That is, When u click the link "OTHER"; it should NOT go to othersite.com ; instead should redirect to mysite.com I guess, this can be done using .htaccess.... Or else are there any other way of doing this [should stop the access of the domain othersite.com] pls let me know how can i do this using .htaccess ??
Can you ellaborate? your description is a bit bleak. Is this what you mean (can you confirm, if im right?): You want all outgoing links to othersite.com to be replaced with mysite.com?. If so you could do this: Create a file named out.php with the following code: <?php $url = $_GET['url']; $url2 = parse_url($url); if($url2["host"] == "othersite.com"){ header('Location: http://www.mysite.com/'); } else { header('Location: '.$url.''); } ?> PHP: Then before your links add (the bold): <a href="out.php?url=http://www.othersite.com">OTHER</a>