Jump to:

23490 Posts in 18996 Topics by 2878 members

General Questions

SilverStripe Forums » General Questions » URGENT securing folder

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 279 Views
  • ppahpp
    Community Member
    3 Posts

    URGENT securing folder Link to this post

    hi guys
    i have an embeded flash program that i need to be in a protected folder to limit access to it. the problem is that the flash program calls up assets from a sub folder.
    a standard htaccess restriction works (see code below). but how do i link that to the ss directory of members.
    i did try a module i had used previously, which uses a more sophisticated method. however the flash program although it seems to load, its access to its assets looks denied.

    help me please before i loose my mind

    #---------htaccess file--------------------
    AuthUserFile .htpasswords
    AuthName "Members Only"
    AuthType Basic
    Require valid-user

  • Mo
    Community Member
    508 Posts

    Re: URGENT securing folder Link to this post

    Hi ppahpp

    I am guessing you mean that you want to restrict access to your flash application to only "members" from your silverstripe install?

    In which case, can't you create a custom template that loads the flash file into a page, then restrict access to the page via the CMS (so only logged in users can see it).

    You could probably then use a module like https://github.com/hamishcampbell/silverstripe-securefiles (that is for 2.4, but I am pretty sure there are 3.0 versions out there too) to restrict access to the assets folder?

    Otherwise I think you would have to find a way to push your members database to local server password store (that .htpasswords), which is not something I would know how to do.

    Not sure if that makes sense, or if I am understanding you correctly?


  • ppahpp
    Community Member
    3 Posts

    Re: URGENT securing folder Link to this post

    you geussed right, id want to restrict acces to the flash program.
    I had the same idea about using secure files. i have been trying but because of silverstripe forces the security through the below .htaccess code, it seems not to grant access to the flash file. While logged in or even ask to log in .

    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_URI} ^(.*)$
    RewriteRule (.*) sapphire/main.php?url=%1&%{QUERY_STRING} [L]

Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.