Follow @BPSPro

Custom Code Help and FAQ – How To Use Custom Code, Adding Custom Code To AutoMagic

4 Comments RSS Site Feed Author: AITpro Admin
Published: February 27, 2012
Updated: February 27, 2012

Custom Code is a new feature in BPS Pro 5.1.5.

How Custom Code Works

B-Core Custom Code: This new feature allows you to permanently save any custom .htaccess code to your WP Database permanently and automatically have that custom code be created in your Root .htaccess file when you click the Create secure.htaccess File AutoMagic button. If your website requires php.ini handler code in your Root .htaccess file and BPS Pro is unable to detect your Web Host because you have a Private Name Server, you are using CloudFlare, you are using Pipe DNS or some other service that is blocking your true Web Host Name Servers and DNS information then you can permanently save your php.ini handler code with B-Core Custom Code. Add custom .htaccess plugin fixes code for personal plugins that you are using. These plugin fixes are saved permanently and automatically created in your Root .htaccess file with you click the Create secure.htaccess File AutoMagic button.

Help Information found in the Add Custom htaccess Code To AutoMagic Read Me button

Add ONLY valid .htaccess code into these text boxes. If you want to add regular text then you need to add a pound sign # in front of the text to comment it out. If you do not do this then the next time you use AutoMagic and activate BulletProof Mode for your Root folder your website WILL crash.

Custom Code and AutoMagic
Any custom .htaccess code that you save here will be saved to your WP Database permanently and automatically be created in your Root .htaccess file when you click the Create secure.htaccess File AutoMagic button.

CUSTOM CODE TOP: Add php.ini handler code and / or miscellaneous custom code here
The CUSTOM CODE TOP text area should really ONLY be used for php.ini handler code if BPS is unable to detect your Web Host. You can add your php.ini handler code and miscellaneous custom .htaccess code in the CUSTOM CODE TOP text area together, but it is recommended that you ONLY use this text area for your php.ini handler code if your website requires php.ini handler code in your Root .htaccess file. BPS Pro is unable to detect your Web Host when you have a Private Name Server, you are using CloudFlare, you are using Pipe DNS or some other service that is blocking your true Web Host Name Servers and DNS information. The CUSTOM CODE BOTTOM text area should be used for miscellaneous custom .htaccess code.

CUSTOM CODE PLUGIN FIXES: Add ONLY personal plugin fixes code here
This text area is for plugin fixes that are specific to your website. BPS already has some plugin fixes included in the Root .htaccess file. Adding additional plugin fixes for your personal plugins on your website goes in this text area. For each plugin fix that you add above RewriteRule . – [S=12] you will need to increase the S= number by one. For Example: if you added 2 plugin fixes above the Adminer plugin fix they would be .htaccess Skip rules #13 and #14 – RewriteRule . – [S=13] and RewriteRule . – [S=14]. If you added a third Skip rule above #13 and #14 it would be Skip rule #15 – RewriteRule . – [S=15].

CUSTOM CODE BOTTOM: Add miscellaneous custom .htaccess code here 
You can save any miscellaneous custom .htaccess code here as long as it is valid .htaccess code or if it is just plain text then you will need to comment it out with a pound sign # in front of the text.

BPS Pro Video Tutorial links can be found in the Help & FAQ pages


Tags: ,

Categories: BulletProof Security Pro

4 Comments to “Custom Code Help and FAQ – How To Use Custom Code, Adding Custom Code To AutoMagic”


  1. VInce Arnold says:

    We are having an issue with sub domains, when created all we get is a blank page when trying to view, however all subs display fine that were created before install of BP Security

  2. Guillermo says:

    I have tested adding custom code to block an IP range from accessing my website, but I keep getting notifications of too many login attempts (from another plugin) coming from IPs in the range that should have been blocked.

    Please tell me exactly how to block a range of IPs with your plugin…

    Thanks!

    • AITpro Admin says:

      Well i’ll tell you that trying to block by IP addresses is very difficult to do. The recent comment spammer coding i added is proving to be more of a pain to deal with then it is worth and comment spammers have quickly come up with new spamming methods. So i of course have created some custom wp-comments-post.php filters that stops them in their tracks. The reason i pointed this out is like i said trying to block by IP address is really tough. The latest trick i am seeing is somehow spammers and hackers are fooling WordPress by using IP addresses with commas (,) in them instead of dots (.) in spam comments. how that is being done i am not sure, but it is impressive. Example: the ip address is 5,88,154,26 instead of 5.88.154.26.

      You can block ip addresses by subnets instead of trying to block an individual ip address.

      <Limit GET POST HEAD>
      Order Allow,Deny
      Deny from 46.119.35.
      Deny from 46.119.45.
      Deny from 91.236.74.
      Deny from 93.182.147.
      Deny from 93.182.187.
      Deny from 94.27.72.
      Deny from 94.27.75.
      Deny from 94.27.76.
      Deny from 193.105.210.
      Deny from 195.43.128.
      Deny from 198.144.105.
      Deny from 199.15.234.
      Allow from all
      </Limit>
      

Skip to toolbar