473,322 Members | 1,494 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Using javascript to redirect visitors based on their search queries

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.

Thanks,

Anon.

Oct 6 '05 #1
2 1476
en******@walla.com wrote:
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.

Thanks,

Anon.


The page that a search engine sees should be the same one your human
visitors see. Using redirects as you suggest is usually not recommended,
and might even cause your site to be removed from some search engines
because it violates their policy about "doorway" pages.
Oct 6 '05 #2
<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.
Oct 6 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: Carter Smith | last post by:
http://www.icarusindie.com/wiki/index.php/Server-Side_Javascript_Check Sample source included This method requires that your pages are PHP enabled and you have mySQL. Although I suppose you...
6
by: Penny | last post by:
Hi all, I've built a simple search <Form> on a web page that is intended to allow the user to search a record store database. There is a drop down box where the user can choose either 'Artist'...
8
by: Luciano A. Ferrer | last post by:
Hi! I was following the http://www.seomoz.org/articles/301-redirects.php article, trying to do that with one of my test sites I added this to the .htaccess file: RewriteEngine On RewriteCond...
11
by: Kent Feiler | last post by:
One thing I like about frames is that they're a good place to stow Javascript. Javascript that I'd like to be around while the visible content of the screen changes goes in the frame declaration...
36
by: Mark Rae | last post by:
Hi, Just had an interesting message from someone who was unable to view one of my sites because they have JavaScript turned off, and expecting me to re-write my site so that they could view...
8
by: Taras_96 | last post by:
Hi everyone, We' ve come to the conclusion that we wish the user to be directed to an error page if javascript is disabled <enter comment about how a webpage shouldn't rely on javascript here :)...
83
by: liketofindoutwhy | last post by:
I am learning more and more Prototype and Script.aculo.us and got the Bungee book... and wonder if I should get some books on jQuery (jQuery in Action, and Learning jQuery) and start learning about...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.