rejetto forum

Software => HFS ~ HTTP File Server => Topic started by: Leo.D.fantast on November 22, 2005, 01:57:07 PM

Title: How to make a folder as homepage?
Post 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?
Title: How to make a folder as homepage?
Post by: rejetto on November 22, 2005, 05:22:56 PM
in the main folder set a default file mask index.html
then create and put a file with that name containing
Code: [Select]
<html><head><meta http-equiv=refresh content="0; /folder1"></head></html>
where folder1 is the name of your folder
Title: How to make a folder as homepage?
Post by: Leo.D.fantast on November 23, 2005, 04:26:25 AM
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:

Code: [Select]
<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.
Title: How to make a folder as homepage?
Post by: rejetto on November 23, 2005, 10:11:50 AM
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 ?
Title: How to make a folder as homepage?
Post by: Leo.D.fantast on November 23, 2005, 02:03:59 PM
Yes, I've tried it in FireFox, it really works.

But most people use IE. Hope there's a solution.
Title: How to make a folder as homepage?
Post by: Anonymous on November 23, 2005, 06:37:04 PM
Quote from: "Leo.D.fantast"
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.
Title: How to make a folder as homepage?
Post by: MarkV on November 25, 2005, 06:55:14 AM
Hm I use the following index.html

Code: [Select]
<!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
Quote from: "Browser"
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
Title: How to make a folder as homepage?
Post by: Leo.D.fantast on November 26, 2005, 03:12:12 AM
It works!

Thank you so much, MarkV.
Title: Re: How to make a folder as homepage?
Post by: Leo.D.fantast on October 31, 2006, 12:50:41 PM
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.
Title: Re: How to make a folder as homepage?
Post by: MarkV on October 31, 2006, 03:00:24 PM
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
Title: Re: How to make a folder as homepage?
Post by: Leo.D.fantast on November 01, 2006, 12:49:29 AM
Thank you.

2.1a build #57 still have this problem.
Title: Re: How to make a folder as homepage?
Post by: rejetto on November 01, 2006, 04:06:46 AM
i think i know the solution:
just replace /folder with /folder/
Title: Re: How to make a folder as homepage?
Post by: Leo.D.fantast on November 08, 2006, 09:30:02 AM
Thank you.