rejetto forum

Author Topic: My questions regarding HFS  (Read 13512 times)

Offline Mars

  • Operator
  • Tireless poster
  • *****
  • Posts: 2059
    • View Profile
Re: My questions regarding HFS
« on: May 06, 2016, 07:07:53 PM »
the answers are not exhaustive but may help as needed

Is HFS using real alphabetical indexing for filenames?

Menu > Other options > Default sorting

Can I restrict direct access to directory, and only allow people to download files ONLY if they know the exact file name? (and use direct link to the file)?

add desired directory to VFS as real folder, set properties flags: Recursively hidden =ON , Browsable= OFF

the user must know the exact url to access each downloadable file

Can I restrict types of clients that can access files hosted by HFS?
Quote
[]
......
<body>
{.for each|agent|Chrome|MSIE|{:{.if not|{.pos|{.^agent.}|{.header|User-Agent.}.}|{:{.disconnection reason| Your browser is not compatible with this server <p> {.header|User-Agent.}.}:}/if.}:}.}

only users using Chrome or Internet Explorer will not be disconnected
blue values must be substings of  User-Agent

Result by using Firefox

Forbidden
Your browser is not compatible with this server

Mozilla/5.0 (Windows NT 5.1; rv:46.0) Gecko/20100101 Firefox/46.0



Unfortunately, what I need is to limit access based on UserAgent only to couple of specific folders. Does anyone know how to do this?


yes, it's possible to cause browser redirection function to a specific folder based on different user-agent

one solution is to have a common directory for redirection and sub directories as folder1 and folder2 and redirect the user to the common folder when his user-agent is in a specific list separated by "|"


to solve the problem I have used this method:
When the user-agent contains one of substrings in the macro "for each"
and if the path (from root) does not start as defined in macro "set"
then the user is redirected to defined folder.

Quote
[]
......
<body>
{.for each|agent|Chrome|Firefox|{:
  {.set|goto|/redirect_folder/.}
  {.if not|{.=|1|{.pos|{.^goto.}|%folder%.}.}|{:
    {.if|{.pos|{.^agent.}|{.header|User-Agent.}.}|{:{.redirect|{.^goto.}.}:}.}
  :}.}
:}.}   

Follow members gave a thank to your post:


Thank-o-Matic 3.0 By Adk Team