July 1, 2015

A WP Ghost adds code to .htaccess file!

I was working with .htaccess and whenever i change some apache headers in .htaccess so in a few moments some script was adding the following snippet again on EOF. It was a surprise for me that what type of ghost is there inside WordPress which has to check the “# END WordPress” and appends after it again and again.
AddHandler x-mapp-php5.5 .php
# BEGIN WordPress

RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]


Finally i tried to search in the plugins area that which script is doing this trick to .htaccess file. Although i found w3c plugin files in wp-content area but the plugin was not installed at that time. After the quest of 30 minutes i reached to a plugin named “BackUpWordPress Backup Plugin” which was supposed to backup the files but he was taking care of .htaccess files too. I simply deactivated it but still something was doing the same with the file so i was wrong about that plugin :(. I continued my search for the next plugin. Finally after testing every single plugin, i found that ghost plugin. It was “Ultimate Members”. So i reported to the plugin author immediately.

Last updated: July 1, 2015