How to move a website through redirect?

How to redirect all people to a specific website except for one referrer, using javascript.?

  • so for example, i want the website to be normal to enter if you come from one specific website(referrer), every other reverrer or even going directly to the website i want to redirect to one other website, so you can only enter if you are referred by the one specific website. i know there are other and better ways to do this like using php, but its a blog and i have only access to edit the html, so i want the code in javascript. i tried a code but its probably all wrong, i dont know much about the website codings, in this example the one site that i want to give access as referrer is google.com and all the others i want to redirect to yahoo.com: if ( document.referrer.search('http://google.com')==-1 ) { do nothing...} else { window.location.href = "http://yahoo.com"; } can someone help me if it is possible to do with javascript?

  • Answer:

    There is no way to do so for the programming... Sorry about that... Good luck!

Yahoo! Answers Visit the source

Was this solution helpful to you?

Other answers

There is no way to do so for the programming... Sorry about that... Good luck!

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.