Something like:
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script type="text/javascript">
onload=function(){
var l=window.location, s=l.search;
if (/cheese/.test(document.body.innerHTML)&&!/search2=/.test(s)&&/search1=/.test(s))
l.href=l.href.replace(/\?search1=/, '?search2=');
}
</script>
</head>
<body>
<div>cheese</div>
</body>
</html>
However, it would be better to intercept the data that writes 'cheese' or whatever to the page and have the server serve the search2 page instead. That way even non-javascript enabled users will get the proper search.
Bookmarks