I am new to .htaccess and WP.
However, I know enough to know that you can restrict public to files using .htaccess.
We have several spreadsheets, which are displayed on our website using a plugin called WPDataTables.
Everytime a certain post loads, the spreadsheet is read from the media library and the table is populated.
Directory is something like wp-content/uploads/2023/spreadsheet.xls
I need to prevent direct access to all except myself when I am logged in as WP admin, and of course I want the spreadsheet to load when the post is opened, so users can view the tables.
Is this possible through .htaccess?
Doesnt have to be bulletproof, just enough so that people dont enter the url to the media library and download my spreadsheets.
Thanks
Protection of files, I have not tried anything besides looking online without luck.
Tom Washington is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.