Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

.htaccess?

Featured Replies

Hi, I think this is the most suitable forum for this...

 

I have a folder on my website called 'files'

 

I'd like a way to make it so nobody can access files by typing it in the address bar. The ONLY way I want it to be accessed is where users can use a directory script I have made to download the files in the folder. Other than that I would like all access restricted.

 

I'm presuming it would be done with .htaccess but I'm a bit of a beginner when it comes to that. Could anybody point me in the right direction?

 

:) Thankssssssssssss!

  • Author

I already have a whole login user system so it's just basically restricting access from the address bar...

create a .htaccess file in your 'files' directory and add this

 

deny from all

 

this will stop anyone accessing anything in the folder.

your script will still be able to process any file in the folder unless it does a http request to get the file, in which case just allow your server access to it

 

order allow deny
deny from all
allow from [your server ip here]

I think I would probably password protect the folder through the control panel for the hosting.

 

My hosting company control panel has an option for this, I don't know if it's an option for you.

I think you can do this in the control panel without editing the .htaccess. Under Index Management, just choose no index and I think it will restrict access to that folder.

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.