Non-Recursive .htaccess files?

EnverexEnverex Worcester, UK Icrontian
edited July 2003 in Science & Tech
Is it possible to make .htaccess files non-recursive? i.e.

The folder layout is like this

-Games
|A
..... Aggy
..... Ambly
..... Adalety
..... Ambeint
|B
..... Bertville
..... Baggins
..... Bobs Bad Day
|C
..... Chaos Engine
..... Cabal
..... Cannon Fodder

Now, what I need is JUST the lowest folders (Baggins, Cannon fodder etc) to have directory listings, non the others, but I cant figure out a way how to do this.

Any ideas?
NS

Comments

  • a2jfreaka2jfreak Houston, TX Member
    edited July 2003
    I think you put the .htaccess file in the last folder in the hierarchy.

    a/b/c/index.html

    if /a nor /a/b do you want dir listings available, then put the .htaccess file in /a/b/c, not /a or /a/b. Try it and see.
  • EnverexEnverex Worcester, UK Icrontian
    edited July 2003
    Er, yeah, I know you can do that but there are over 6000 folders so thats not an option.

    NS
  • edited July 2003
    You have 6,000 WEBBABLE area folders that all need to be web accessible or have subfolders within them accessible???
  • EnverexEnverex Worcester, UK Icrontian
    edited July 2003
    Yep -

    NS
  • edited July 2003
    Ok. If this is XP based, no idea because I do not know a way to tier access with UID and GID in XP, and think making many shortcuts would not do much for you either except cut down on edit overhead when you modify things later as needed.

    If this were Linux, the easiest thing would be a large number of links to the htaccess file, one link per folder you want excluded (links can be copy-pasted). Ditto BSD. I would try a few soft links, as then you can delete the link and still keep the file in what I had to test with.

    I would do this with links or permissions given your large data tree problem. You can fairly easily have subfolders more restricted to specific user than parent folders in things other than Linux(although the reverse is generally NOT true).

    A mix of that might work.

    It looks like you are using directories to sort instead of indexing in a DB and using a shallow (logical) storage tree structure.

    John Danielson.
  • EnverexEnverex Worcester, UK Icrontian
    edited July 2003
    The storage tree wasnt my idea, its the <a href="http://www.tosec.org">TOSEC</a&gt; standard.

    But the point is, doesnt that idea still involve me doing it 6000 times?

    Anyway, time to stop the equasion. I figured a way round this a while ago, and the way round it was to not use apache's directory listing and to use PHP to do it instead. Gives me lots of control too.

    I.e. http://atomnet.co.uk/amiga/dir?game=Flashback

    So I just replace Flashback with the game name, so what it does is checks the first letter of the game to find the first subfolder, and the game files are under the name that you type in anyway, and it works well. Had to double raw encode the game files as some of them contained + chars etc, but I wouldnt be typing those in manually anyway.

    e.g. One of the files links -

    Flashback%2520%25281992%2529%2528U.%2520S.%2520Gold%2529%255Bcr%2520Interpol%255D%255Bt%2520%252B2%2520Supplex%255D%2528Disk%25203%2520of%25204%2529.zip

    Cheers anyway,
    NS
  • edited July 2003
    Um, script a recursive copy of a soft link to each directory in tree, delete from directories you do want to have access.

    Depends on how logically tall the tree is versus its logical width. How effective this is(how much subcategorizing by file storage tree structure the ellipses represent) is proportionate to height of data structure defined in folders versus indexed.

    Will shut up now.... :) Happy you found a fix.

    John Danielson.
  • a2jfreaka2jfreak Houston, TX Member
    edited July 2003
    Glad you found a way to accomplish what you were trying to achieve.
Sign In or Register to comment.