prevent public access to media links
-
Hi all, I’m dealing with an issue related to the media libraries and all other internal urls.
In my child theme I already redirected all permalinks to 404 in function.php, but I want to prevent also the media links from external users. The site is not a blog, there is no public access and I don’t want that some “clever guy” just tries a couple of “https/sitename/wp-content/uploads …” having so access to all our private files (which we don’t want to share).
I have a couple of code samples to restrict access to admin only, but they don’t work. I know that there is also the way to tweak .htaccess for this scope. The point is that our .htaccess is already modified and I don’t know if additional codes can override something.
Which is the appropriate way to prevent public access to private files? Thank you.
- The topic ‘prevent public access to media links’ is closed to new replies.