Log in

View Full Version : Redirect from subfolder to page - need help



itquestion
03-13-2007, 02:06 PM
I hope someone might be able to help me.

I have a url: http://www.site.com/folder that I want to redirect to
http://www.site.com/folder/page.html Another thing to note is that the folder and its pages are in the root of a Lotus Notes server.

How would I be able to achieve this? I have tried a 301 redirect and it doesn't work with subfolders.

Your opinions & advice is greatly appreciated.:)

Jack
03-13-2007, 02:34 PM
Try:


<html>
<head>
<title></title>

<script language="JavaScript" type="text/JavaScript">
<!--
function MM_goToURL() { //v3.0
var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}
//-->
</script>
</head>

<body onLoad="MM_goToURL('parent','http://www.site.com/folder/page.html');return document.MM_returnValue">
<div align="center"><strong>Loading... Please wait!</strong><br>
(If nothing happens in 10 seconds please click <a href="http://www.site.com/folder/page.html"><strong>here</strong></a>)</div>
</body>
</html>

itquestion
03-13-2007, 03:17 PM
I appreciate your reply. I must not have mentioned that I want to direct a URL that I am advertising as "www.site.com/foldername" to www.site.com/foldername/index.html . So, essentially, there is no source available to insert the above code, b/c it's a folder users will type in the address.

In other words, I have advertised the /foldername of my website and I would like a solution a server-side script to redirect the user to my "/foldername/index.html" page.

Do let me know if there is a server-side solution you might know of.

Thanks.

BLiZZaRD
03-13-2007, 03:24 PM
You can place it in the index.html as this is the default when not file is specified. ALL browsers go to an index page although they don't show the index.*** unless you type it in.

The only way to NOT have this happen is to not have an index page in that folder.

You can also try the meta redirect:



<META http-equiv=REFRESH content="0;URL=http://www.site.com/folder/file.html">


Again this would go in the <head> of the index page