rejetto forum

Making more than One DNS adress for different sites

0 Members and 1 Guest are viewing this topic.

Offline Luckyfriend222

  • Occasional poster
  • *
    • Posts: 8
    • View Profile
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?


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13510
    • View Profile
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.


Offline bacter

  • Operator
  • Tireless poster
  • *****
    • Posts: 681
    • View Profile
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:
Code: [Select]
{.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
      :}
      .}
your computer has no brain - use your own !


Offline Luckyfriend222

  • Occasional poster
  • *
    • Posts: 8
    • View Profile
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!


Offline bacter

  • Operator
  • Tireless poster
  • *****
    • Posts: 681
    • View Profile
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:
Code: [Select]
     {.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.}:}.}



your computer has no brain - use your own !


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13510
    • View Profile
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.}:}.}