rejetto forum
Software => HFS ~ HTTP File Server => Topic started by: Luckyfriend222 on February 19, 2010, 11:23:28 AM
-
Okey, I know the subject is vague, and I will try to explain my problem as good as possible, so please bare with me.
I have my HFS set up perfectly. I'm on a network, and I share an Install File of a program that is very readily used. I want people to type in, in the Address bar of their explorer for instance "http://getprogram.blah.blah" and then it must take them directly to the shared folder with the install file. BUT, I don't want this to be the default folder to be taken to if people want to access other folders on my server. So if they type in my hfs server address as they would normally, they must still go to the "Home Page". But seeing that there are a whole bunch of noobs on my network (they're even worse than me :D ) I want that install file to be accessible to them if they type in that unique address.
Is this possible?
-
sure.
why don't you just give the direct address to the install file?
like http://getprogram.bla/folder/install.exe
if it's too long, suggest what the install address should look like, and how should look the address for the plain server.
-
If you have a domain like blah.bla.org and your domain allows subdomains, you can use the subdomain getprogram.blah.blah.org and modify you main section of the template in the following way:
{.if |{.pos|getprogram.blah|{.header|host.}.}|
{:
--> write here html for the 'homepage' of the downloadsite that contains only one link to /anyopenfolder/install.exe
:}
|
{:
--> put here the content of your old main section to access folders and files
:}
.}
-
Thanx you guys!
Suggestions: For the plain server it should read something like : http://140.163.1.1 (Because it is on an intranet, it will automatically take the person to the home page) And for the folder in which the program lies, it should read like this : http://getdc.ath.cx
That is what I want, is it possible at all to get these unique different addresses to direct the people to the same HFS server? Sorry if I'm not making sense.
Thanks again for all the help guys!
-
You can use the following macro module that allows not only what you need, but also to host different 'sites' with one instance of hfs. I call this macro 'assignsite'. It assigns a variable 'site' thet you can use in if or switch statements to display different pages, style or contents.
You have to posible origins to access your server:
a) from lan: 192.168.xx.yy or computername , and from the host also localhost and 127.0.0.1
This allows 2 accesses from lan and 4 from localhost
to access more 'sites' you can use a &site=xxx extension
b) from wan: ip(86.23.xx.yy for example), domname1, sub.domnane1, domname2 ..
With this, the assignsite module shows like this:
{.comment| access from lan or localhost.}
{.if |{.pos|127.0.0.1|{.header|host.}.}|{:{.set|site|demo.}:}.}
{.if |{.pos|localhost|{.header|host.}.}|{:{.set|site|site1.}:}.}
{.if |{.pos|MyComputerName|{.header|host.}.}|{:{.set|site|site2.}:}.}
{.if |{.pos|192.168.|{.header|host.}.}|{:{.set|site|site3.}:}.}
{.if|{.urlvar|site.}|{:{.set|site|{.urlvar|site.}.}:}.}
{.comment| from here on wan access.}
{.if |{.pos|86.23.|{.header|host.}.}|{:{.set|site|demo.}:}.}
{.if |{.pos|bacter.homelin|{.header|host.}.}|{:{.set|site|site1.}:}.}
{.if |{.pos|wiki.bacter.homelin|{.header|host.}.}|{:{.set|site|site2.}:}.} {.comment|here i use a subdomain.}
{.if |{.pos|anothersite.homelin|{.header|host.}.}|{:{.set|site|site3.}:}.}
-
i will make bacter's suggestion easier to use (but i didn't test it!).
let's say your install file is at /folder/install.exe
press ALT+F6 and add this text to the file that will open
[+request]
{.if|{.pos|getdc|{.header|host.}.}|{:{.add header|location: /folder/install.exe.}:}.}