Knowledge Base » Website

Category > Website

Increase memory for PHP using .htaccess

Thursday, August 18th, 2016

If you see the following error on a PHP script, you can easily fix it by increasing the allowed memory to your PHP script. Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 113 bytes) in To do that, simply add the line below to a .htaccess file in your public_html folder […]


How to force SSL (redirect) using .htaccess

Thursday, August 4th, 2016

When your website has SSL enabled, you may want to force all traffic to be served over the SSL encrypted connection only. This can easily be achieved by adding the code below in your .htaccess file. If you have any redirect codes in your .htaccess file, we recommend adding this before that and verifying that […]


Redirect all requests to www.website (or non-www)

Thursday, August 4th, 2016

Redirecting your website from non-www to www URLs can be as simple as adding suitable code in your .htaccess file. For non-WordPress websites, you can use the code below replacing domainname.com with your own domain name. RewriteEngine on RewriteCond %{HTTP_HOST} ^domainname.com$ RewriteRule ^(.*)$ http://www.domainname.com/$1 [R=301,L] For WordPress websites, this should be done by setting the […]


Disable comments in WordPress

Friday, April 19th, 2013

Leaving comments open without good captcha protection in WordPress can lead to a lot of spam and oversized databases. Here is a quick way to disable comments for all posts from PHPMyAdmin (which can be launched from your hosting control panel). Click the SQL tab in PHPMyAdmin and run the two commands below, one by […]


Speed up your website with gzip compression

Thursday, October 4th, 2012

* Note: This article only applies to Linux hosting. On IIS, compression is normally enabled on server level. * Does your website appear to be loading slow? Speed it up using gzip compress and mod_deflate. You can first verify if your site is already serving compressed content from this link. If it isn’t, add the […]


Website infected with an IFRAME or malware script

Monday, May 25th, 2009

Websites infected with an IFRAME or malware script IFRAME and java script based malware infections are growingly common these days. These infections normally occur either through leaked FTP passwords or machines infected with virus / malware that adds these lines of code on files uploaded. Most of the time, it is through a leaked FTP […]