Quick .htaccess question

mc se7en

New Member
Messages
218
Reaction score
4
Points
0
I've got Options -Indexes on my .htaccess to block access to my directories. However, when you visit certain directories, unintended index files load (created by iWeb, the JS files for the index, aptly named index.js).

Is there anything I can stick in .htaccess to block index.js (but NOT index.html, etc).

Example: www.mcse7en.com/index_files/

I'm attaching a screenshot of the directory's contents so you can see what all is in there. If index.css is going to load, I'd like to block that too and just have it redirect to my 403 page, but without blocking it from loading as part of my index (so the index page can still access the js and css it needs).

Thanks!
 

Attachments

  • Screen shot 2009-12-27 at 1.26.58 PM.png
    Screen shot 2009-12-27 at 1.26.58 PM.png
    102.3 KB · Views: 36
Last edited:

fakeit

New Member
Messages
8
Reaction score
1
Points
0
if I understood right you need to specify index files that are allowed manually, like this:
Code:
DirectoryIndex index.html index.shtml index.pl index.cgi index.php
with Options -Indexes, index.js will not be an index and listing will be forbidden
 
Top