dcsimg
www.webdeveloper.com
Results 1 to 8 of 8

Thread: About permissions

  1. #1
    Join Date
    Aug 2003
    Posts
    32

    About permissions

    Is there a way to give acces to a document in my website ONLY by a link in the same website?

    I give an example.

    I have a document named "document.pdf" in a folder named "archive". I want it to be read or downloaded only by clicking a link in my website with the href "archive/document.pdf", but I don't want anybody to read the document typing in the URL bar "www.website.com/archive/document.pdf". Is it possible to do this way? Has it something to do with the R-W-X permissions? Heeeeelp!

  2. #2
    Join Date
    Nov 2003
    Location
    Jerryville, Tejas
    Posts
    11,715
    You can only do that by interposing a server side process like CGI or a language like PHP.

  3. #3
    Join Date
    Jul 2003
    Location
    New York City
    Posts
    2,771
    If one is using the Apache server, wouldn't one be able to accomplish something like this via .htaccess?

  4. #4
    Join Date
    Aug 2003
    Posts
    32

    I have PHP available

    My server supports php. I'm not able to change the options (to activate global variables, etc.), but I can upload PHP scripts to be executed.

  5. #5
    Join Date
    Feb 2003
    Posts
    86
    I think the .htaccess is right, if you can do that. They may let you do it if you ask, or do it for you?

  6. #6
    Join Date
    Nov 2003
    Location
    Jerryville, Tejas
    Posts
    11,715
    Yes, htaccess is another route, requiring an id/password to get to the document.

  7. #7
    Join Date
    Jun 2004
    Location
    England
    Posts
    2,972
    As you don't have access to you .htaccess file, I think you're best bet might be PHP Sesions.

  8. #8
    Join Date
    Jul 2003
    Location
    New York City
    Posts
    2,771
    Is it really sessions or password protection he's looking for? From what you describe, I'd think you'd want to check the HTTP Referer. Are you sure you can't use .htaccess? The best thing to do is to create a file named '.htaccess' and see if it works.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles