Zubrag.com
August 14, 2020, 08:31:06 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: protect folder only  (Read 130 times)
websmoker
Newbie
*
Posts: 1


« on: July 26, 2020, 03:40:44 PM »

Hi, i want to use the php user login.
It is not to protect the total webshop.
i have a folder /directory full of .jpg files
before loding it, there should be a login for users. The pictures have wine and tobacco and will be forbidden to show .

the folder name is ( as in google) x1x and is my root
the link to the .jpg is:
www.domain.com/contents/x1x/picture.jpg
The link is automaticalli pulled in to the shop after loading

Question:
can i use the php script before the link s are loaded? i am affraid the jpg load already before the user is at the shop.

hope someone has a suggestion
thnx


Logged
zubrag
Administrator
Hero Member
*****
Posts: 790


WWW
« Reply #1 on: August 06, 2020, 05:35:16 AM »

You could forbid direct access. Here is example for apache
https://stackoverflow.com/questions/40158651/how-to-prevent-direct-access-to-files-but-allow-files-in-webpages
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC