htaccess madness – After Bulletproff Security
-
Hi,
Let’s be frank : i am not an htaccess expert.I had installed BulletProof Security on a site with another plugin, “Hide My WordPress”. Both modify the htaccess.
I have had some issues using Bbpress and as far as I know, Bulletproof modifications on htaccess some times may cause issues. That’s why I deactivated it.I found a very weird htaccess the with 12 times the same (usual patern.) Here it is :
# BULLETPROOF .47.4 >>>>>>> SECURE .HTACCESS # If you edit the BULLETPROOF .47.4 >>>>>>> SECURE .HTACCESS text above # you will see error messages on the BPS Security Status page # BPS is reading the version number in the htaccess file to validate checks # If you would like to change what is displayed above you # will need to edit the BPS /includes/functions.php file to match your changes # If you update your WordPress Permalinks the code between BEGIN WordPress and # END WordPress is replaced by WP htaccess code. # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> # END WordPress # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> # END WordPress # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> # END WordPress # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> # END WordPress # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> # END WordPress # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> # END WordPress # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> # END WordPress # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> # END WordPress # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> # END WordPress # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> # END WordPress # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> # END WordPress # This removes all of the BPS security code and replaces it with just the default WP htaccess code # To restore this file use BPS Restore or activate BulletProof Mode for your Root folder again. # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> # END WordPress # BLOCK HOTLINKING TO IMAGES # To Test that your Hotlinking protection is working visit https://altlab.com/htaccess_tutorial.html #RewriteEngine On #RewriteCond %{HTTP_REFERER} !^https?://(www\.)?add-your-domain-here\.com [NC] #RewriteCond %{HTTP_REFERER} !^$ #RewriteRule .*\.(jpeg|jpg|gif|bmp|png)$ - [F] # BLOCK MORE BAD BOTS RIPPERS AND OFFLINE BROWSERS # If you would like to block more bad bots you can get a blacklist from # https://perishablepress.com/press/2007/06/28/ultimate-htaccess-blacklist/ # You should monitor your site very closely for at least a week if you add a bad bots list # to see if any website traffic problems or other problems occur. # Copy and paste your bad bots user agent code list directly below.
Sorry, it is long.
Well I tried to replace it by my usual standard htaccess. See :
SetEnv PHP_VER 5 SetEnv REGISTER_GLOBALS 0 # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> # END WordPress
The first two lines are necessary on my host I heard.
YHere is what I get when I try to modify anything in my site. (I can brows it normally though.)
Warning: Cannot modify header information – headers already sent by (output started at /home/myDomain/www/wp-content/themes/Avada-Child-Theme/functions.php:1) in /home/euroisme/www/wp-includes/pluggable.php on line 1121
What is wrong in my (lovely and charming) htaccess that is not in the (ugly and awkward) post-BulletProof one ?
Thanks for any help
(And sorry for the long quote)
- The topic ‘htaccess madness – After Bulletproff Security’ is closed to new replies.