JavaScript URL sniffer forward redirect

<!–Let’s make sure this wasn’t loaded outside the framework! –>
<script src=”../js/forwarder.js” type=”text/javascript”></script>

<script>
function where_are_we(){

var pushoff = “http://url/folder1/base_url_for_site”;
var str = window.location.toString();
var temp = new Array();
temp = str.split(/pages/);
//alert(‘0 ‘ + temp[0] + ‘ 1 ‘ + temp[1]);
switch(temp[1])
{

case ‘/01.php’: window.location = “http://url/folder1/folder2/#state_lesson_more_1”; break;

}
//if(str.search(/pages/) != -1 ){ window.location = push_off; }

}
window.onload = where_are_we();

</script>

Comments are closed.