+ Reply to Thread
Results 1 to 5 of 5

Thread: Quick .htaccess question

  1. #1
    mc se7en's Avatar
    mc se7en is offline x10 Sophmore mc se7en is an unknown quantity at this point
    Join Date
    Oct 2009
    Location
    Chopin
    Posts
    218

    Quick .htaccess question

    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!
    Attached Thumbnails Attached Thumbnails Quick .htaccess question-screen-shot-2009-12-27-1.26.58-pm.png  
    Last edited by mc se7en; 12-27-2009 at 12:29 PM. Reason: forgot the screenshot! :P

  2. #2
    fakeit is offline x10Hosting Member fakeit is an unknown quantity at this point
    Join Date
    Aug 2009
    Posts
    8

    Re: Quick .htaccess question

    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

  3. #3
    mc se7en's Avatar
    mc se7en is offline x10 Sophmore mc se7en is an unknown quantity at this point
    Join Date
    Oct 2009
    Location
    Chopin
    Posts
    218

    Re: Quick .htaccess question

    That did it. Thanks a lot!

  4. #4
    fakeit is offline x10Hosting Member fakeit is an unknown quantity at this point
    Join Date
    Aug 2009
    Posts
    8

    Re: Quick .htaccess question

    i'm glad that it worked
    welcome!

  5. #5
    mc se7en's Avatar
    mc se7en is offline x10 Sophmore mc se7en is an unknown quantity at this point
    Join Date
    Oct 2009
    Location
    Chopin
    Posts
    218

    Re: Quick .htaccess question

    you have been rep'd!

+ Reply to Thread

Similar Threads

  1. Quick CSS Question
    By Twinkie in forum Programming Help
    Replies: 9
    Last Post: 10-22-2009, 07:41 PM
  2. Quick Liquid Physics Question
    By masshuu in forum Off Topic
    Replies: 3
    Last Post: 09-06-2009, 11:48 PM
  3. A quick question about the Arcade
    By alburian in forum Free Hosting
    Replies: 2
    Last Post: 09-04-2008, 11:27 PM
  4. Quick question about .htaccess
    By 1337scape in forum Free Hosting
    Replies: 2
    Last Post: 03-06-2008, 08:33 PM
  5. Quick Question
    By tdesouza in forum Free Hosting
    Replies: 3
    Last Post: 10-23-2007, 05:00 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers