how to password protect downloadable pdf files in website

前端 未结 4 1773
日久生厌
日久生厌 2020-12-14 13:10

I am having a personal portfolio website and i have a some pdf files like

Some file

I dont want everyo

4条回答
  •  囚心锁ツ
    2020-12-14 13:52

    Follow @rsmith84's tips but make sure you block folder access:

    Apache .htaccess file

    Deny from all
    

    IIS web.config file

    
        
            
                
                
            
        
    
    

    Thenh allow delivery only with a PHP file. Verify user and then do readfile('/protectd/file/path') from your protected folder.

提交回复
热议问题