I am using Options +FollowSymLinks -MultiViews
within a .htaccess file that is stored within 1 folder above the images folders, but this causes issues for seeing the images in these directories when outputted onto the page via a URL. Once I remove this from the .htaccess, all images display fine.
Here is the entire .htaccess file as I have it:
Options +FollowSymLinks -MultiViews
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ http://%{HTTP_HOST}/ [R=301,L]
Is there something wrong with this? Cause the images are not being displayed at all when outputting them within an <img>
tags src attribute.
Within the actual images directories, I have another .htaccess file that looks as follows:
<FilesMatch "\.(jpg|jpeg|png|gif|bmp)$">
<IfModule mod_headers.c>
Header unset Pragma
FileETag None
Header unset ETag
Header set Cache-Control "max-age=864000, public, must-revalidate"
Header unset Last-Modified
</IfModule>
</FilesMatch>
Perhaps there is a better alternative for this that will allow me to see the images fine in the folders on my server? I'd like to know what was actually causing this to begin with to be honest.
Will removing this line cause any security risks? Options +FollowSymLinks -MultiViews
Can I simply replace it with: Options -Indexes
?
Basically, I still want the files within the folder to be accessible, but I don't want it so that when browsing to the URL of the folder, the files all get shown in there, if you know what I mean. Also, wondering, if this can be made so that it only accepts files from my server, and not any others? If that's possible or even makes sense...?