Browsed by
Month: January 2017

Creating a Simple .htaccess redirect

Creating a Simple .htaccess redirect

RedirectMatch uses a regular expression that is matched against the URL path. And your regular expression /contact.php just means any URL path that contains /contact.php but not just any URL path that is exactly /contact.php. So use the anchors for the start and end of the string (^ and $): RedirectMatch 301 ^/contact\.php$ /contact-us.php redirect 301 /contact.php /contact-us.php John McMurrayJohn McMurray is a freelance PHP developer. Experienced in PHP, Laravel and WordPress he can code anything you need. Based in…

Read More Read More

Spam Trap for Contact Form 7

Spam Trap for Contact Form 7

This plugin adds spam checks to catch contact form 7 spam. It does so in the background without annoying your legitimate users with captchas. It adds a hidden field to the your contact form 7 form and then checks when a contact form 7 is submitted for that field. If its not present, or its filled in, then we can be sure that it was a bot of some sort. It also adds the ability to check for links in…

Read More Read More

PHP Namespaces

PHP Namespaces

PHP namespaces allow you to namespace your functions! Ok, so I know that’s circular reasoning. Let’s see what that means. We’re all familiar with the way that files and folders work on our PCs. If you have two files with the same name, then they cannot exist in the same folder. So, if I have a file called notes.txt with all my work related notes, then I can’t also have a file called notes.txt with all my personal related notes…

Read More Read More