Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

htaccess question

  • 14-03-2007 1:35pm
    #1
    Registered Users, Registered Users 2 Posts: 648 ✭✭✭


    hi

    I created a newsletter directory to put HTML files.

    I’d like to block the access to http://www.domain.com/newsletter/ but not to the newsletters themselves.

    I can’t remember how to do that.

    does anyone know ???


Comments

  • Registered Users, Registered Users 2 Posts: 3,514 ✭✭✭Rollo Tamasi


    I'm not 100% on what you want to do.
    Do you have files in a dir which you don't want listed if they go to domain.com/dir? If that's the case then you need to prevent directory listing via a .htaccess file, put this line in a .htaccess file and save it in the dir - IndexIgnore * - You could just put a blank index.html file in the directory too.


  • Registered Users, Registered Users 2 Posts: 568 ✭✭✭phil


    Standard Unix permissions will help you here as well.

    Providing you own the directory and aren't the user who runs Apache, then:
    $ chmod 711 dirname
    

    If non-octal permissions make more sense use:
    $ chmod u=rwx,g=x,o=x dirname
    

    That means read, write and execute permission for you (i.e. full control), and only execute permissions for everyone else

    Execute-only permissions on a directory means you can read files from the directory but only if you know their full name. You cannot get a directory listing.

    Phil.


  • Registered Users, Registered Users 2 Posts: 3,594 ✭✭✭forbairt


    An alternative would be to just throw in an index file into that folder thats empty hence they won't get a directory listing ? as I believe you still want people able to see ... /newsletter/januarynewsletter.html ? if they so wish ?

    edit: just saw "Rollo Tamasi" .. blank index file .. :D


Advertisement