0
Welcome Guest! Login
0 items Join Now

Direct access to files

  • Direct access to files

    Posted 16 years 11 months ago
    • Hello

      I have tried to find an answer to this question by searching the forum at joomla.org without success. I found many threads, but not a good answer, so I´m asking You kind people instead. I have a member section on my site with flash presentations that are only intended for the members. The files are stored in images/stories and if You know the direct url to the file (the presentations are launched via a file called player.html) You can launch the presentations without being logged in. Is there a way of preventing this? :-\
    • Bob Ateah's Avatar
    • Bob Ateah
    • Elite Rocketeer
    • Posts: 4521
    • Thanks: 0

    Re: Direct access to files

    Posted 16 years 11 months ago
    • Something like JACL would do the trick I believe Peter.
    • The member formerly known as Roland Deschain
      After your question is solved, please Edit your original post and choose the Solved message icon, thank you!
  • Re: Direct access to files

    Posted 16 years 11 months ago
    • That wouldn't work for him -- he's concerned about people accessing the file directly, not through Joomla.
    • Joe K's Avatar
    • Joe K
    • Elite Rocketeer
    • Posts: 902
    • Thanks: 0

    Re: Direct access to files

    Posted 16 years 11 months ago
    • I wonder if there was a way to restrict access to that page unless it was directed from a another specific page (members only page). Sounds like some htaccess might be able to accomplish.

      It is only a matter of time before Gollumx strolls by and offers the perfect solution.
  • Re: Direct access to files

    Posted 16 years 10 months ago
    • Hi

      I think I have found a solution. Not a perfect one, but still it is sufficient for my needs. I added some Javascript to the html file that launches the flash presentations.
      <SCRIPT LANGUAGE=JAVASCRIPT TYPE="TEXT/JAVASCRIPT"> 
      <!-- Hide script from old browsers
       
      if&nbsp;  (document.referrer = "http://www.referringPageName.html") 
      &nbsp; &nbsp; &nbsp; location.href = "yourPage.html"; 
      //-- Stop hiding script --> 
      </SCRIPT>
      The link to the html file that launches the presentations is on a member page, so I simply set the documet.referrer to that page and when You try to access the file directly, You get redirected to the logiin page. I guess it´s simple to go around this if You set the referrer tag to the correct url, but for my needs I think it is OK. Or am I wrong?
      Thanks for Your inputs
  • Re: Direct access to files

    Posted 16 years 10 months ago
    • Hi

      Sorry. The code should contain a != statement.
      <SCRIPT LANGUAGE=JAVASCRIPT TYPE="TEXT/JAVASCRIPT"> 
      <!-- Hide script from old browsers
       
      if&nbsp;  (document.referrer != "http://www.referringPageName.html") 
      &nbsp; &nbsp; &nbsp; location.href = "yourPage.html"; 
      //-- Stop hiding script --> 
      </SCRIPT>

      /Peter
    • Kat05's Avatar
    • Kat05
    • Preeminent Rocketeer
    • Posts: 25898
    • Thanks: 334

    Re: Direct access to files

    Posted 16 years 10 months ago
    • hi peter!

      if you are using cpanel, you should try the INDEX MANAGER to set the image folder and the folder where the flash gallery files are stored AND their subfolders to NO INDEXING and you will need to enable HOTLINK PROTECTION. then it should be impossible for visitors to access the pictures or flash presentation by just typing in the file path into their browser.

      You should then check if the flash presentation still works for the logged in user members and also test it in different browsers. for one of my sites the flash gallery worked in internet explorer, but in firefox the pictures did not show.
      The only time so far that i prefered IE over firefox :-)

      Anyway, I hope it works for you, give it a try
      Greetings, Kat
    • Kat05 / QA Lead & Support / Germany
  • Re: Direct access to files

    Posted 16 years 10 months ago
    • Hi

      Thank You Kat, but I´m not using cpanel, so for now I will stick to the "amateur" solution.

      /Peter

Time to create page: 0.068 seconds