Code for .htaccess
-
I want to add some code to my .htaccess file to prevent hackers from accessing my wp-includes folder. I found 2 different examples of code to add. One example starts the code with <IfModule mod_rewrite.c>. The other example starts the code with RewriteEngine On. I would like to know the reason for the 2 different setups and what one should I use. Here are the 2 different examples:
Example 1:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
# more code goes here
</IfModule>Example 2:
RewriteEngine On
RewriteBase /
# more code goes here
RewriteRule ^wp-includes/theme-compat/ – [F,L]
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Code for .htaccess’ is closed to new replies.