1
I hope my doubt is clear:
I’ve seen images uploaded by Amazon Cloudfront that has its URL "differentiated" for images and blocks all subfolders of the path if the user tries to access. Explain.
URL displaying the image: dyqnik0vds4aw.cloudfront.net/uploads/blog/image/900/image.jpg
If we remove the jpg image., for example, displays the following message:
This XML file does not appear to have any style information associated with it. The document tree is shown below.
<Error>
<Code>AccessDenied</Code>
<Message>Access Denied</Message>
<RequestId>0A1B7A4F06A544B7</RequestId>
<HostId>
HAvQCyWqXGr6xFPOA4IIZPWudC+TSxyBnjQyMitrHu5cQ9eBk6zbFrHWY82xvMVREzYbnWCtU5g=
</HostId>
</Error>
That is, if the user tries to access any other subfolder of the image path is blocked.
However I am using Wordpress to create a site, when you use an image, by default, it gets the URL site.com/wp-content/uploads/2018/02/imagem.png
. If the user withdraws /2018/02/imagem.png
(in case, accessing site.com/wp-content/uploads/) the INDEX OF page appears and it is possible to access some folders, what I would like to avoid if possible.
Anyway, I wonder if I can block/hide the image path the way Amazon Cloudfront blocks your links.
----------------------- *edited* -------------------------------
After a while dealing with websites and seeing several things here from SOPT, in the opera summary, what I want is to create a page 403 forbidden
that in addition to blocking folders more specifically Wordpress is a custom page.
I believe it would only be to increment the @Almeida response below.
Possible duplicate: https://answall.com/questions/214786/htaccess-para-impedirnavega%C3%A7%C3%A3o
– Valdeir Psr