Sample Header Ad - 728x90

prohibit access to pdf files via URL

0 votes
0 answers
83 views
Simply I am trying to prevent access to all pdf files on my server from being reached and downloaded using URL Eg https://domain.com/test.pdf .
What I succeed to do is : to prevent indexing them, but it still accessible via URL. **What I've tried so far :** in both files *mywebsite.conf, apache2.conf*
Require all denied Order allow,deny Deny from all I tried to block the directory as well but did not work.(with/without VirtualHost). I changed **AllowOverride** to **All** in apache2.conf I tried to block them using .htaccess Order Allow,Deny Deny from All still accessible. (Ubuntu 20.04) Any help will be appreciated.
Asked by MertHaddad (101 rep)
Aug 13, 2022, 04:31 AM