<en******@walla.com> wrote in message news:11**********************@g44g2000cwa.googlegr oups.com...
Hey,
I have lots of visitors to my site from search engines, but they don't
always get sent to the right page.
So... based on the search query of the refering search page (e.g.
google or yahoo) how can I redirect the user to another page.
For example, if they searched for "browsers" and got to my website then
I'd like to redirect them to my page about web browsers.
You could have an array of objects each consisting of a search word/url pair:
var url_Lookup=[ {'kWord' : 'browsers', 'url' : 'browserpage.htm'},
{'kWord' : 'weeding', 'url' : 'gardening.htm'},
{'kWord' : 'planing', 'url' : 'carpentry.htm'} ];
Then (assuming document.referrer is available and contains a '?' ) loop through the array searching for word matches in
the remainder of the referrer string. If a match is found, jump to the associated url.
--
S.C.