Knowledge Base » 2016 » August

Archive for August, 2016

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

STATIC / CUSTOM WEBSITES 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 […]


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. # ensure www. RewriteEngine on RewriteCond %{HTTP_HOST} !^www\. [NC] RewriteRule ^ https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]] Alternate code: RewriteEngine on RewriteCond %{HTTP_HOST} […]