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
Other answers
There is no way to do so for the programming... Sorry about that... Good luck!
Related Q & A:
- How to drop all connections to a specific database in postgres without stopping the server?Best solution by Database Administrators
- How to open flash projector on a specific screen?Best solution by stackoverflow.com
- How to return multiple objects of a specific library in R?Best solution by Stack Overflow
- Why cannot I not access a specific website?Best solution by Super User
- How can I find pictures of a specific unknown person?Best solution by Yahoo! Answers
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
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.