by greg | Dec 16, 2020
Here is a basic bad block blocker for the .htaccess file. RewriteEngine On RewriteCond %{HTTP_USER_AGENT} ^.*(Baiduspider|HTTrack|Yandex|mj12bot|bingbot).*$ [NC] RewriteRule .* – [F,L]
by greg | Jan 22, 2018
So I have found that the regular Directory Protection feature in CPanel does not work straight out of the box with WordPress installs. In the below code after you setup a protection through CPanel you can take the provided data and customize it to match what is...
by greg | Aug 5, 2016
Here is some code I found that can be used to protect a directory but tell the server to still allow access to specific files and folders. SetEnvIf Request_URI “(path/to/folder/)$” allow SetEnvIf Request_URI “(path/to/file\.php)$” allow Order...
by greg | Sep 17, 2018
So I have ran into an issue where a site was using URL's in the file_get_contents function and stopped working on the server. This was also an issue if anyone was trying to do a URL include within a require() or an include(). Here was a solution that I found that...
by greg | Feb 13, 2019
So every now and then I run into an issue where I need to setup redirects for addon domains. Here is one method that has always worked for me. Adding it in this way allows for https and non http and also handles non-www and www to redirect to the www.newdomain.com...