rejetto forum
Software => HFS ~ HTTP File Server => Topic started by: Leo.D.fantast on November 22, 2005, 01:57:07 PM
-
What I want is:
When someone type my IP address in browser, the folder added to HFS is opened as the homepage.
But now I can only open the default hompage
http://192.168.26.1/
then open the folder
http://192.168.26.1/folder
Can I just type http://192.168.26.1/ and open that folder?
-
in the main folder set a default file mask index.html
then create and put a file with that name containing
<html><head><meta http-equiv=refresh content="0; /folder1"></head></html>
where folder1 is the name of your folder
-
You mean this?
(http://img520.imageshack.us/img520/753/snap38iw.jpg)
Put the index.html in the virtual main folder as the picture show? or in the folder where HFS installed?
And my index.html file contain the following:
<html><head><meta http-equiv=refresh content="0; /folder"></head></html>
But when I type only the IP address, I can't open the page.
-
hmm, yes, it is all right
well, it seems to work with firefox and opera
IE seems to have problems
i don't know why
does anyone know how to make this solution compatible with IE ?
-
Yes, I've tried it in FireFox, it really works.
But most people use IE. Hope there's a solution.
-
But most people use IE.
Most security minded people use Opera and maybe Firefox. IE is used mainly by newbies who don't know better.
-
Hm I use the following index.html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<script language="JavaScript1.1" type="text/javascript">
<!--
location.replace("/folder");
//-->
</script>
<noscript>
<meta http-equiv="Refresh" content="0; URL=/folder">
</noscript>
</head>
<body>
If your browser does not support redirect <A href="/folder">click here</a>
</body>
</html>
There are 3 options:
1. Javascript
2. The 'normal' way http-equiv="Refresh" (if JS is disabled)
3. If 1 and 2 fail the text If your browser does not support redirect click here.
is displayed so you can advance manually.
Tested with IE and works with and without JS. Hope that helps. :)
MarkV
-
It works!
Thank you so much, MarkV.
-
I have some trouble with the new version. Almost all times when someone visits my page, the page can't open. He must refresh the page for many times, then got the following page:
301 - Moved permanently to /MyFolder/
click the link '/MyFolder/', finally got the right one.
Perhaps the code that MarkV posted can't redirect to the folder in new version.
Now I can only use back to version 2.0.
Please help me, dear MarkV.
-
Are you using the latest version?
There are already several (older) posts about this problem. It seems to be IE related, lets see...
here (http://www.rejetto.com/forum/index.php?topic=3621.0), here (http://www.rejetto.com/forum/index.php?topic=3719.0), and here (http://www.rejetto.com/forum/index.php?topic=3745.0).
You should post in the Bug Reports (http://www.rejetto.com/forum/index.php?board=28.0) forum if your problem persists even with the latest version (2.1a build #55 at time of writing). But it has nothing to do with the redirection code I think (well it's not even MY code, somebody posted it earlier already).
MarkV
-
Thank you.
2.1a build #57 still have this problem.
-
i think i know the solution:
just replace /folder with /folder/
-
Thank you.