Hello assume im getting a request(from another site) to my website like this; http://www.seperatesite.com/ext.php?ref=http://mysite.com (when this happens it will open mysite in a iframe) if some thing like that happens , i want to truncate(ignore) this part; http://www.seperatesite.com/ext.php?ref= and letting my site visible as normal.... simply i want to redirect to mysite.com - http://mysite.com please guide me ... how can i control such a thing using .htaccess thankx
You seem to be saying that another site is loading yours in an iframe. Depending on what the other site is, perhaps you can ask them not to do this and link to your site properly. Otherwise I think your only alternative is to use a Meta Refresh to redirect the page to just the URL of your site, because I'm fairly certain that what you want to do isn't possible using .htaccess
You can use JavaScript I think. It's something like parent window = self. (Just paraphrasing). That will break you out of the frame. If, on the other hand, this is a redirect and your page is showing up like normal with just that URL then you can user javascript also. To window.location =
Your pages will have to break out of the iframe. Add this to the home page of http://mysite.com: <script type="text/javascript"> function breakOut() { if (self != top) window.open("my URL","_top",""); } </script> </HEAD> <BODY onLoad="breakOut()"> (Courtesy of http://www.htmlhelp.com/faq/html/frames.html#stop-framing)