Google Webmaster Tools - Associating Multiple Domains

Google Webmaster Tools – Associate Multiple Website URLs to One

Recently I worked on a project with multiple URL’s all pointing to the exact same content.  This was killing this particular sites SEO rankings as the content was split amongst multiple domains.  In the Google Webmaster tools there were about 10 different sites all registered and all competing against each other. Google Webmaster tools only […]

Do htaccess Rules Cascade

Do htaccess rules cascade into subfolders

Do htaccess rules cascade into subfolders within your website?  By default they do.  However they do not cascade the same way that many of us might think they do.  Let’s explore how the cascading rules apply. In CSS, it is easy to learn the cascading rules by simply taking the farthest to closest approach.  Rules […]

Failed URL for HTTP Error Code Redirect Pages

Custom Apache Error Handler – Get the Error URL in PHP

Scenario   You are using an Apache and PHP environment.  You provide an ErrorDocument directive to create a common landing page for HTTP Errors (such as a custom 404 error page.)  This may have been setup either in your http.conf file or via an .htaccess file.  The rule might look like the following: ErrorDocument 404 /errors/index.php […]

Creating an SSH Config file for server shortcuts

If you SSH into a lot of different servers, you may want to create an SSH Config file so that you can use shortcuts to do the commands.  This post will go over the basic steps of creating an SSH Config File. Without this file if you wanted to SSH to a server, you needed […]

WordPress and jQuery – Get by Element ID not working

I racked my brain on this one for a bit the other day.  So I figured I would make a post on it to hopefully help some others. During my development of a WordPress plugin I was having trouble with WordPress and jQuery working together.  In particular, having jQuery interact with a Form element inside of […]

PHP Script to validate a phone number

This is a fast and simple script to validate a phone number. The purpose of this script is to keep things simple.  The scripts cleans input whether it is passed as a numeric value or as a string.  It then validates it’s count of numbers found present in the value, then returns only the numbers […]

PHP Script to validate an Email Address

I do a lot of programming that requires validation of user data – including a users email address. When I am collecting this data via a Web Form, I like to use the JQuery Validate plugin to give immediate feedback to my user when they have not entered an e-mail address properly. In addition, I like […]

Circular Arrow

PHP Array to Object and Object to Array

In your php applications you may find many circumstances where it is needed to convert an object into an array and an array into an object. One common example of this usage is in Server <-> Client communications.  The server may want to store items in an array for sorting and iteration.  By contrast, the […]

Random Numbers

PHP Script to generate a random salt

There are many times and circumstances in your programming that you may need to write and generate a random salt.  This may be include: Creating passwords for users Coupon codes Random identification strings When this is needed, many programming languages have a default random function of some kind.  For example, in PHP you have RAND […]