Monday 30 January 2012

Duplicated site is running slower - hacked site fixed be checking reWrite rules

After transferring a website from a testing server to a live environment I noticed that the speed of requests and page loading time had severlly deteriorated.

If you get this problem then firstly I'd suggest using Mozilla Firefox browser and the Firebug tool.


Click on the 'net' tab and you'll then be given a break down of what 's wrong.

in this case it was a virus, I realised the page was calling a mysterious folder and it's contents. The contents where easily deleted but the folder wasn't real and created by a ReWrite Rule. The next port of call was the .htaccess file.

which read

RewriteEngine On
RewriteRule ^c/(.*) wp-blog.php?p=$1
RewriteRule ^icons/(.*) 109a0ca/$1
RewriteRule ^sitemap.xml wp-blog.php?sitemap=1
RewriteRule ^robots.txt wp-blog.php?robots=1
RewriteRule ^feed/ wp-blog.php?feed=1

on the site I was transferring from there was no Rewrite rules, and therefore no problem.

I changed the .htaccess file to this

RewriteEngine Off
RewriteCond %{REQUEST_URI} !^/c

to doubly make sure nothing is send to the 'c' folder, where the problem resided.

The problem with loading times is now sorted.

No comments: