Here you will find details of news, projects, releases and other bits and pieces that we are working on at Boolean.
We hope that you find something of interest amongst the archives.
Code snippets, methodologies and useful links will also be mentioned here.
![]() |
There are a few reasons to force a trailing slash at the end of URLs including SEO
A quick snippet for your .htaccess is below:
And while I’m here a quick snippet to prevent hotlinking of images. This will redirect all requests to a specified image, simply replace yoursite.com with your own URL, and nohotlinking.jpg with your own image and path.
And finally a snippet to put in your image assets folder (you have images stored separately right?) to prevent malicious code execution and prevent directory listing of all your assets.
Firefox has a limitation for cross domain font embedding in that it does not allow you to embed from another website. This .htaccess snippet allows you to bypass this limitation and embed fonts located on another webserver.
| |
Occasionally a webhost will block the very useful phpinfo() command making it difficult to understand any limitations of the server configuration. This script can display relevant information to help you understand what is happening behind the scenes.
if(!is_null($d_func) && $d_func !== “”){echo “Disabled Functions: \n $d_func”;}
if(!is_null($safe_mode) && $safe_mode !== “”){echo “<span style=’color:red;’>Safe Mode is Active</span> <br>”;}
if($up_max >= 1001){$up_max = $up_max / 1024; $up_max_size = “Gigabytes”;
if($up_max >= 10001){$up_max = $up_max / 1024; $up_max_size = “Terabytes”;}}
if($post_max >= 1001){$post_max = $post_max / 1024; $post_max_size = “Gigabytes”;
if($post_max >= 10001){$post_max = $post_max / 1024;$post_max_size = “Terabytes”;}}
if (min($input_max,60)){$input_max = $input_max /60;}
if (min($exec_time,60)){$exec_time = $exec_time /60;}
if($mem_limit >= 1001){$mem_limit = $mem_limit / 1024; $mem_limit_size = “Gigabytes”;}
echo “Maximum Upload Size = $up_max $up_max_size<br>”;
echo “Maximum Post Size = $post_max $post_max_size <br>”;
echo “Maximum Input Time = $input_max minute/s<br>”;
echo “Memory Limit = $mem_limit $mem_limit_size<br>”;
echo “Maximum Execution Time = $exec_time minute/s<br>”;
?>
![]() |
Quite some time ago now I wrote about the importance of 301 redirects for SEO purposes.
In a minor addition to that post here is a snippet I often use to ensure search engines do not view http://yourdomain.com and http://www.yourdomain.com as duplicate content.
To perform a redirect from domain.com to www.domain.com, insert the following code into your .htaccess file.
To perform a redirect from www site to non-www site, use the following code in .htaccess file.
Sender Policy Framework (or SPF) is an email validation system designed to addressing source address spoofing. It allows administrators to specify which hosts are allowed to send email from a given domain by creating a specific DNS SPF record in the public DNS. Mail exchangers can then check that mail from a given domain is being sent by a host sanctioned by that domains administrators.
So, after setting up mail from Google apps you’re getting this error:
(IP addresses and domains have been changed to protect the innocent)
You check your DNS records and everything seems to be in order…
You’ve changed your cname for mail to point to Google: ghs.google.com
You’ve changed your MX records for your domain to point to Googles: aspmx.l.google.com etc
You’ve configured your server in Cpanel to act as a Remote Mail Exchanger
For Google to accept your mail server as a relay, you need to enter a line in your DNS zone:
(Do not use the built in SPF in Cpanel, and you may need your host to enter this line for you)
A little info is here for Google Support
Background reading in SPF in Wikipedia is here