ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Folder Access

June 12, 2008 11:11pm

Subscribe [1]
  • #1 / Jun 12, 2008 11:11pm

    sachin_himcs

    1 posts

    Hi,

    I am new to url rewriting.
    My problem is : How to give specific folder access to user.

    for Example My folder Hierarchy is root_folder/upload/Ouvrages/files/

    upload and ouvrages folder also have many other folders.files folder have pdf files uploaded by user.

    user can upload files in “files” folder and also any other folder in this hierarchy.

    Now i want user can access or see directory listing only and only for “files” folder.and in case upload or ouvrages or any other folder should not accessible and redirect to any other page that has some error message.and admin can access all folder to see or download files.

    i write rule for this.

    RewriteRule ^/upload/ouvrages/files/$ http://www.example.com/upload/ouvrages/files/List.html [I,O,R,L]


    RewriteCond Referer: (?!http://(www\.)?example\.com).*
    RewriteRule ^/upload/.*$ /upload/ouvrages/textes/error.html


    Please help me

    Thanks
    Sachin Kulshreshtha

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases