regular expressions Tag Archive

Open Links to a Different Site in a New Window with Prototype


Using the JavaScript library Prototype I can easily make any external links open in a new window, as well as change the rel=”external” links to open in a target=”_blank” window!

Popularity: 67% [?]

.htaccess Redirect a Directory to a Subdomain and Force WWW


It’s really easy to force the www for your website URL and to redirect a directory properly to a new subdomain address. Just give it a shot, organize your directories!

Popularity: 32% [?]

Block Content and Detect Wordpress Preview


Need to block tracking scripts in your WordPress Template when you preview your entries. I have just the way! Just a few lines into your functions.php file and header/footers and you can block Mint or Analytics in WordPress previews.

Popularity: 48% [?]

Search Query for 404 Error Pages Wordpress


A code snippet update to a Wordpress 404 template that immediately redirects to a search if a tag no longer exists. It even re-directs with a 301 code to ensure search engine’s follow.

Popularity: 27% [?]

Encoding & and HTML Entities in PHP


Special characters like MS Word’s smart quotes can muck up a good custom piece to CMS work. First we’re going to go over using a regular expression to make sure that & and any character code starting with & can always be save, and displayed in a form or webpage.

Popularity: 23% [?]