• Resolved ultraspontane

    (@ultraspontane)


    I run a photo based blog, and I’ve recently discovered a site that links right to my upload directory.

    I want people to visit my actual website, and not the upload directory.

    How do I prevent my upload directory from being viewed?

    Thank you.

Viewing 8 replies - 1 through 8 (of 8 total)
  • If you have a Cpanel hosting account, disable hotlinking in Cpanel

    If not, start here http://www.webhostingtalk.com/showthread.php?t=228103
    And Google for similar articles if this one doesn’t do the job for you

    Thread Starter ultraspontane

    (@ultraspontane)

    What does hotlinking have to do with accessing my upload directory?

    I don’t care if people hotlink my pictures, I just don’t want people to be able see my upload directory.

    Moderator James Huff

    (@macmanx)

    Volunteer Moderator

    Create a blank text file titled index.html and upload it to the uploads directory, which is usually /wp-content/uploads/ .

    Thread Starter ultraspontane

    (@ultraspontane)

    That didn’t solve my problem.

    All that did was add an extra line “index.html.txt” on the upload directory page.

    Some one has to know how to fix this. Hasn’t anyone ever disabled access to their upload directory?

    change the name of the file from index.html.txt to index.html

    OR

    add this line to your hataccess file, which will turn directory listings off in all folders
    Options -Indexes

    Thread Starter ultraspontane

    (@ultraspontane)

    I tried creating index.html within my web hosts file manager, and it worked.

    Now it just shows a blank page. Now is there anyway I can add a redirect to my home page with these index.html files?

    Thanks for the help.

    rename index.html to index.php and put the following inside:

    <?
    Header( "HTTP/1.1 301 Moved Permanently" );
    Header( "Location: http://www.mydomain.com " );
    ?>
    Thread Starter ultraspontane

    (@ultraspontane)

    Thanks!

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘How to stop people from accessing my upload directory.’ is closed to new replies.