403 forbidden error coming

Discussion in 'Apache' started by coders, Feb 21, 2010.

  1. #1
    I have many different theme images folder under main images folder. And I do not want google to index sitename.com/images/img1 , sitename.com/images/img2 folders and so on.

    I also do not want the user to show all my theme images for these deep images folder like by typing this in the browser:
    sitename.com/images/img1

    But I want Google to index images of all the folders.
    Which permissions do I apply for these folders.
    When the permission for img1 folder is set to 755, Google indexes it and the user cab also see it.
    When the permission is set to other no., Google reports a 403 forbidden error, user also see the 403 forbidden page. This is not I want as user just goes off when he sees this.

    Kindly help !
     
    coders, Feb 21, 2010 IP
  2. MrYu

    MrYu Peon

    Messages:
    157
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2
    These are filesystem permissions, you can't use them for access control as you are describing. If you want the files to be servable by the web server to at least someone, they need to be readable by the server.

    In fact, there is no 100% sureshot solution against someone determined, but to prevent deeplinking in a rudimentary form, you can use mod_rewrite. Just google up how to do it, there is plenty of examples out there that are more comprehensive than what I would care to write here.
     
    MrYu, Feb 27, 2010 IP