Cory94bailly Posted June 9, 2008 Share Posted June 9, 2008 I want to use the apache code to show all files in a directory: Options +Indexes That works great and all but how can I make it so it does not show 1 or 2 files with that? Any help will be appreciated. Quote Link to comment Share on other sites More sharing options...
wildteen88 Posted June 9, 2008 Share Posted June 9, 2008 Use IndexIgnore +yourfile.ext change yourfile.ext the actual file you want to hide from the directory listing. Or If you have a bunch of files you want to hide but has the same file extension then use IndexIgnore +*.ext IndexIgnore Manual Quote Link to comment Share on other sites More sharing options...
Cory94bailly Posted June 9, 2008 Author Share Posted June 9, 2008 Use IndexIgnore +yourfile.ext change yourfile.ext the actual file you want to hide from the directory listing. Or If you have a bunch of files you want to hide but has the same file extension then use IndexIgnore +*.ext IndexIgnore Manual Ohh, thanks One more thing..! Can I make my .htaccess like this: Options +Indexes IndexIgnore +file.exe IndexIgnore +test.html IndexIgnore +log.txt IndexIgnore +*.php ? Quote Link to comment Share on other sites More sharing options...
wildteen88 Posted June 9, 2008 Share Posted June 9, 2008 Yes that is ok. However you can combine all the IndexIgnore directives into one Options +Indexes IndexIgnore +file.exe test.html log.txt *.php Quote Link to comment Share on other sites More sharing options...
Cory94bailly Posted June 9, 2008 Author Share Posted June 9, 2008 Yes that is ok. However you can combine all the IndexIgnore directives into one Options +Indexes IndexIgnore +file.exe test.html log.txt *.php Oh, that's alot easier Thanks! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.