SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Addict psychedelic's Avatar
    Join Date
    Feb 2002
    Location
    Boston
    Posts
    284
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    another .htaccess question

    How do you set it so that different directories have different directory indexes using only one .htaccess file?

    I tried this:
    Code:
    <Directory "/dir1">
    DirectoryIndex news.html
    </Directory>
    
    <Directory "/dir2">
    DirectoryIndex index.html
    </Directory>
    
    <Directory "/dir3">
    DirectoryIndex index.php
    </Directory>
    and it doesn't work. I'm just curious.

  2. #2
    Mlle. Ledoyen silver trophy seanf's Avatar
    Join Date
    Jan 2001
    Location
    UK
    Posts
    7,168
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Put a .htaccess file inside each directory

    Sean
    Harry Potter

    -- You lived inside my world so softly
    -- Protected only by the kindness of your nature

  3. #3
    Sports Publisher mjames's Avatar
    Join Date
    Jan 2000
    Location
    Charlotte, NC
    Posts
    5,891
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes, if you just want one directory to be affected by the .htaccess, put the file in it and it will affect just that directory.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •