Advanced Search

Results 1 to 4 of 4

Thread: Error on navigating to directory with no index file (htaaccess)

  1. #1
    Join Date
    Mar 2011
    Location
    N 11░ 19' 0.0012 E 142░ 15' 0
    Posts
    1,508
    Thanks
    41
    Thanked 89 Times in 88 Posts
    Blog Entries
    3

    Default Error on navigating to directory with no index file (htaaccess)

    Is there any way to set up the specified using htaacess?
    I tried before, but it just broke the entire website

  2. The Following User Says Thank You to keyboard For This Useful Post:

    bernie1227 (03-12-2013)

  3. #2
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,154
    Thanks
    260
    Thanked 690 Times in 678 Posts

    Default

    Do you want to display a directory listing? Or do you want to disable the directory listing? Or do you want a redirect? Or do you want to set some other file than index.htm (etc) as the default page?*

    (*Note: there's usually a hierarchy, something like index.php, index.htm, index.html, default.php, default.htm/l, etc.; so you don't need to set that for any of those default names, unless you'd want to switch the order, but you could set it for some other file like name.htm to act as index.htm.)
    Daniel - Freelance Web Design | <?php?> | <html>| espa˝ol | Deutsch | italiano | portuguŕs | catalÓ | un peu de franšais | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  4. #3
    Join Date
    Mar 2011
    Location
    N 11░ 19' 0.0012 E 142░ 15' 0
    Posts
    1,508
    Thanks
    41
    Thanked 89 Times in 88 Posts
    Blog Entries
    3

    Default

    Disable the directory listing, or just show a blank page; either is fine.

  5. The Following User Says Thank You to keyboard For This Useful Post:

    bernie1227 (03-12-2013)

  6. #4
    Join Date
    Jul 2008
    Location
    Derbyshire, UK
    Posts
    1,882
    Thanks
    16
    Thanked 288 Times in 287 Posts
    Blog Entries
    4

    Default

    Code:
    IndexIgnore *
    The line above in your .htaccess file (on a UNIX server) should disable file listing in that folder and all sub-folders.

    If .htaccess is causing trouble, you could also create an empty "index.htm" or "index.php" file in the folders you dont want listing. Of course it wouldn't filter down to sub-folders, so you'd need to do it in all folder where you need to disable the directory listing.
    Focus on Function Web Design | Latest News RSS | Facebook | Twitter |
    Fast Edit (A flat file, PHP web page editor & CMS. Small, FREE, no database!) | Fast Edit BE (Snippet Manager) (Web content editor for multiple editable regions!) | Fast Apps |
    The only limit to creativity is imagination: JemCon.org

Similar Threads

  1. Replies: 1
    Last Post: 08-29-2009, 06:52 AM
  2. Trouble navigating directory structure
    By JasonDFR in forum PHP
    Replies: 5
    Last Post: 04-02-2009, 04:41 PM
  3. Help with .htaaccess Permissions with Wordpress
    By tehinternetz in forum Other
    Replies: 1
    Last Post: 08-14-2008, 05:55 PM
  4. file and directory permissions
    By kosi in forum PHP
    Replies: 3
    Last Post: 05-30-2007, 08:59 AM
  5. Navigating through Site directory...
    By almarenan in forum JavaScript
    Replies: 0
    Last Post: 11-20-2004, 04:48 AM

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
  •