Results 1 to 2 of 2

Thread: Redirecting a visitor from a folder to the root directory

  1. #1
    Join Date
    Aug 2012
    Posts
    2

    Redirecting a visitor from a folder to the root directory

    When a user manually navigates to a certain folder on a website (images), how do you redirect them to the root directory?

  2. #2
    Join Date
    Aug 2012
    Posts
    2
    This worked for me:

    Inside the .htaccess file in the root directory, place the follow at the very top:

    Code:
    Options -Indexes
    Upon a visitor accessing a folder with no index.html, they are sent to the root index.html, rather than being able to view a list of folder contents.

    NOTE: A file within the folder CAN still be accessed by typing its complete path. (Example: mysite.com/images/picture.jpg)

Similar Threads

  1. Diverting root directory
    By 888 in forum Web Design, HTML Reference and CSS
    Replies: 1
    Last Post: 09 Jun 2008, 05:17 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
  •