Hiding everything on your site but the index file?

by krull
3 replies
  • WEB DESIGN
  • |
I'm having a product launch soon. Here's how I want this to work:

I want only the index.html page to be accessible. That means that when you try and 'snoop around' on my site, it basically redirects you back to the index or tells you you can't access where you're trying to go. I've got hundreds of files on my server and I don't want anyone spoiling the launch for themselves by snooping around and guessing directories and files.

I thought about just moving files and password protecting directories, but that would be a bit too much work and things might go haywire if a mistake is made on my end.


How would I go about doing this easily?
#file #hiding #index #site
  • Profile picture of the author Bellthorpe
    Use a directive in .htaccess
    {{ DiscussionBoard.errors[2038579].message }}
    • Profile picture of the author Number_5
      To add to Bellthorpe's response, you'll want to create a .htaccess file on the root of your website. Your webhost will need to have mod_rewrite installed (most do). In the file you should be able to use something like this


      Code:
      Options +FollowSymlinks
      Options +Indexes
      RewriteEngine On
      RewriteRule ^.+$ index.html [R=301,L]
      {{ DiscussionBoard.errors[2039025].message }}
  • Profile picture of the author senderbot
    Hi,

    You usually only get a list of whats in your directory if there is no index.html file there. As long as your root has an idex.html file in it then people wont be able to see what else is in there. They can guess at the page names but how easy is that?

    Also any folder you upload can simply have a blank index.html file in it to hide its contents.

    Cheers

    Max
    Signature
    PornStarStamina is for sale! - Buy the book rights and website! or Just Download the Book For FREE! - Check it out!
    {{ DiscussionBoard.errors[2040054].message }}

Trending Topics