Blocking file indexing via .htaccess
-
Hi,
I have a website where the filing system was showing. On investigation I found this code: Options -Indexes
to add to .htaccess to stop this from occurring. They did not say whereabouts to put it. However, I added it (stupidly I guess) within the WP tags so that it looked like this:# BEGIN WordPress # The directives (lines) between "BEGIN WordPress" and "END WordPress" are # dynamically generated, and should only be modified via WordPress filters. # Any changes to the directives between these markers will be overwritten. <IfModule mod_rewrite.c> RewriteEngine On RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> Options -Indexes # END WordPress
(and yes for some reason I ignored the top warning!!!)… After a few weeks of having it there, it (the Options -Indexes code) disappeared. I couldn’t work out why but then today I re-read the warning at the top and figured out that it was being overwritten!!! My question is: Does WordPress actually overwrite this code from time to time and if so does anyone have any idea how regularly? If no to the above, is it possible that it could be overwritten automatically by a plugin change or something else?
Thanks for your help!
Nic
- The topic ‘Blocking file indexing via .htaccess’ is closed to new replies.