var href = 'search', ie = '\v'=='v';
function locat_IE(href){
var f=document.createElement('form');
f.action=href;document.body.appendChild(f);f.submit();
}
if(ie)locat_IE(href);else location.href = href;
Или типовой путь
<!DOCTYPE HTML>
<html>
<head>
<base href="http://site-name.ru/test/">
<script type="text/javascript">
function GetBaseURL () {
if ('baseURI' in document) {
alert ("The base URL for the document:\n" + document.baseURI);
}
else {
var baseTags = document.getElementsByTagName ("base");
if (baseTags.length > 0) {
alert ("The base URL for the document:\n" + baseTags[0].href);
}
else {
alert ("The base URL for the document:\n" + window.location.href);
}
}
}
</script>
</head>
<body>
<button onclick="GetBaseURL ()">Get the base URL for the document</button>
</body>
</html>