Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6084167
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T11:29:22+00:00 2026-05-23T11:29:22+00:00

My website users login using accounts they setup in my website. I of course

  • 0

My website users login using accounts they setup in my website.

I of course store their login info in a db table and this table is accessed when they fill out the login form. This is just a proprietary system I created.

When users are logged in, they can see a list of documents that are stored in a folder on my website. If they are not logged in, they don’t have access to this list. However, if someone knows the direct URL of one of the documents, they can download it without logging in. I want to restrict access to this folder to only logged-in users.

I guess I could put a password on the folder itself, but I don’t want users to have to enter a password twice. How can I detect if the user is logged in and restrict access to only a logged in user?

Forgive me if this question sounds basic, but I come from the world of IIS and I’m not sure how to do this using a PHP web server.

This is basically the same question
, although I’m not using asp.net or IIS.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T11:29:23+00:00Added an answer on May 23, 2026 at 11:29 am

    I’d setup a page that they could login to that would list out the files and allow the user to click on. It could easily be tied into your existing system that way with very little effort. You could then protect the directory from direct listing on screen and be as secure as your existing auth system allows.

    Here’s an example of how to get the files in a particular directory You could then foreach the array and link them up accordingly. If you were really concerned about file “theft” you could setup a download page that the user would have to route through to get the downloads themselves, thereby totally obscuring the directory.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have website where users can login with their Facebook account. I am using
I want to let users login to my website using their Facebook, or Twitter
I'm creating a website in Ruby on Rails, where users can login using RESTful
Im trying to allow users to login to a website by verifying if they
Users have been able to log into my website using their Facebook account, but
I would like to enable the visitors of my website to login using their
I am using a facebook app to allow users to login to my website.
How does Stack Overflow allow new users to login into Stack Overflow using their
I'm trying to create a website that allows users to login with their Facebook
I have a website created in .NET where users are required to register/login to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.