apache - How to allow server to access files but not user? -
i have directory bunch of files in & don't want able access these files either getting directory listing or guessing file location & typing in.... should not allow them download it. i accomplished putting below in .htaccess file: options -indexes order allow,deny deny however, want user able download file if access via script (which in different directory) give them download. @ moment above settings doesn't work. i thought of putting like.. allow domain.com but i'm not 100% sure means? check request coming & hence work if server requests access dir? ...or still not work user still using domain via other script access dir? if dump files "script" can store files outside documentroot. need no htacces file. perhaps better workaround.