Question

how to block specific url in my droplet?

Posted October 23, 2017 1.7k views
CMSUbuntu 16.04
I have a wordpress site in my droplet and i have a directory folder named 
"tv_channels" where i put many html and php files which is not ally with 
wordpress...... whenever i post anything then i embed a file from that directory
but users are going only that folder directly and access my those php/html files.
now i want to block that url for user besides i want to embed my files in post.....

Can you guys help me out??

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
1 answer

It would be better if we had more details, but assuming you are running apache, and assuming you mean that users are able to view what’s in your “tv_channels” folder *directly*, then this answer should help.

If you are on NginX, you could block access to that folder, and then have a backend processor, like PHP, grab and display the file directly to the user. That way only humans should be able to access the file, and only one at a time, as displayed by the page.

Submit an Answer