[colug-432] Fwd: javascript help needed

Angelo McComis angelo at mccomis.com
Sat Jun 2 15:32:50 EDT 2012


It's possible. Program somepage to check the referrer property. If
referrer is not otherpage, send them to otherpage.

Example here for referrer checking:
http://stackoverflow.com/questions/2031362/checking-the-referrer

You'll need to account for those with JavaScript disabled (or using
the noscript plugin).

Because you have only client side scripting available to you, I hope
this is not something super private or valuable you are protecting
with this referrer check.


On Jun 2, 2012, at 1:24 PM, Brian <bnmille at gmail.com> wrote:

> We have some users at work who want a web page redirection.  They
> claim it was working once, but I can't find any previous
> files/examples that would have caused it to work.
>
> What they want:  When people hit a link directly,
> example.com/somepage, it is suppose to redirect to
> example.com/otherpage.  The "otherpage" may (or may not) have some new
> information on it, but it will also have a link on it back to
> "somepage".  If "somepage" detects the referral from "otherpage", it
> is suppose to let the people connect to it.  But otherwise, it should
> always send people to "otherpage".
>
> The claim is that this was done in javascript.  I found something
> similar using PHP, but PHP is not an option for us, as the web page is
> not on our server, and the server does not have PHP installed.  Could
> anyone suggest some javascript that could do what they want?
>
> Thanks.
>
> _______________________________________________
> colug-432 mailing list
> colug-432 at colug.net
> http://lists.colug.net/mailman/listinfo/colug-432


More information about the colug-432 mailing list