Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 7 of 7
  1. #1
    Junior Member
    Join Date
    Oct 2006
    Location
    US/Norway
    Posts
    3
    Member #
    14146
    Hey all,

    First of all, greetings to everyone since this is my first post here

    My name is Manol and I am a mixer/recording engineer and I´m trying to design my personal site where I can post my portfolio and offer audio services.

    I am a relative beginner when it comes to web design. I have designed a few basic HTML-based web sites including one of my bands´pages at http://www.machinecalledman.com but I don´t really have much experience and I´m finding it difficult to design my pages without help from other kind individuals

    Anywho, I have the following question that I hope someone will be able to help me out with:

    How do I set up access permissions for the secondary directories in my website so other people cannot access that directory by simply changing the URL?

    To clarify (I´ll use my own site as an example) in the following URL:

    http://www.manolmanolov.com/Images/BG_pattern.jpg

    If you take out the file name and leave out just the

    http://www.manolmanolov.com/Images/

    part of the URL you can go directly into my Images directory and have access to all the files that I have in there.

    How do I prevent that so that when you do the above manipulation you get the infamous ´You do not have permission to view the following directory´or similar message like the one in the example below:

    http://www.darktranquillity.com/images/seoul.jpg

    When you attempt to go into the Images directory you get the ´Directory Listing Denied´message.

    So, what is the magic trick for getting that to happen for my directories as well?

    I hope I explained this clearly since I am not very good at explanations to begin with (hence the examples

    I´d really appreciate some help!


    Thanks in advance,

    Manol

  2.  

  3. #2
    Senior Member karinne's Avatar
    Join Date
    Dec 2003
    Location
    Aylmer QC Canada
    Posts
    1,607
    Member #
    4335
    Liked
    8 times
    That's something your host should do for you.
    [a web design portfolio - Currently NOT AVAILABLE for work | web design | Re-coding | PSD-to-HTML]
    I'm also on: virb - facebook - twitter - flickr - del.icio.us

  4. #3
    WDF Staff mlseim's Avatar
    Join Date
    Apr 2004
    Location
    Cottage Grove, Minnesota
    Posts
    7,694
    Member #
    5580
    Liked
    717 times
    Manol ...

    One simple thing would be to put an "index.html" file into that directory.

    That index.html file could be something as simple as:

    <html>
    <head><title> my site - permission not granted </title>
    </head>
    <body>
    Sorry, permission not granted ...
    </body>
    </html>

    Now, at that point, when they enter that directory, the server looks for
    any index.shtml index.html, index.htm, or index.php files. Those index
    files are served-up when found.

    People who know what your image names are could still display them
    (if they know the names of the files) ... but it stops the list of files that
    you are now seeing.

    If you get into the habit of using .php for extensions (example, index.php),
    you can then insert PHP scripting directly into those HTML files. This might not
    mean much now (as a beginner), but you'll soon see where you can utilize that
    for dynamic pages. That's a different topic though.

    I mention PHP because if you use Notepad to create the text file (in blue) and
    save it as "index.php" ... put that file in your directory.

    <?php
    header ("location: http://www.mysite.com");
    ?>


    Now, assuming your webhost allows PHP scripting, when someone goes to
    your images directory, they will be immediately redirected to your main page.
    They won't even get any message, it will appear sort of invisible.
    Of course, put your own URL in there, and save it as "index.php".


    .


  5. #4
    Senior Member karinne's Avatar
    Join Date
    Dec 2003
    Location
    Aylmer QC Canada
    Posts
    1,607
    Member #
    4335
    Liked
    8 times
    Yep ... you could do that too.
    [a web design portfolio - Currently NOT AVAILABLE for work | web design | Re-coding | PSD-to-HTML]
    I'm also on: virb - facebook - twitter - flickr - del.icio.us

  6. #5
    Junior Member
    Join Date
    Oct 2006
    Location
    US/Norway
    Posts
    3
    Member #
    14146
    Thanks very much guys!
    I'll try the index.html trick tonight and let you know of the results.
    I've not been brave enough to venture into PHP territory yet, but I'll keep that tip in mind as well, for future reference

    Cheers,
    Manol

  7. #6
    Junior Member
    Join Date
    Oct 2006
    Location
    US/Norway
    Posts
    3
    Member #
    14146
    Everything works fine with the index.html trick, guys.

    Thanks again!
    Manol

  8. #7
    WDF Staff mlseim's Avatar
    Join Date
    Apr 2004
    Location
    Cottage Grove, Minnesota
    Posts
    7,694
    Member #
    5580
    Liked
    717 times
    Manol,

    Darn! I wanted to view your /images and steal some,
    but I'm denied! Just kidding ... glad we could help.

    Don't be afraid to start experimenting with PHP.

    Create another directory for playing with PHP ... you
    won't regret it. You'll soon see the powerful things
    you can do ... and it's really easy.



Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 12:19 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com