Skip to main content

Posts

.htaccess Redirect

Previously, I posted a quick .htaccess tip which you can find here:  http://2bluesolutions.blogspot.ca/2012/07/apache-modrewrite-all-files-temporarily.html As an addendum, I have recently discovered this great site: http://htaccessredirect.net/index.php This site will generate an .htaccess file for you based on a whole bunch of variables you can enter into the form. It's probably not as complex as some of you would need, but those of us making complex .htaccess files don't need this site, right? It's a great tool for creating fast and simple .htaccess file for handling a bunch of redirections. http://htaccessredirect.net/index.php

Apache - Mod_Rewrite All Files (Temporarily) To One File

For example, say you want to put up a coming soon page on a Drupal site and you don't want to edit the "Down for Maintenance" file, you can just quickly alter the .htaccess file. This example involved a Drupal site where I had FTP access, but not admin access to the installation. So, the quickest option was to whip up a coming soon page, upload the file as index.html and then put up a new .htaccess file (backing up the original). The .htaccess file should look like this: <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule !^/index.html$ /index.html [R=302] </IfModule>

Specific CSS Based On Orientation

A quick and easy way to load specific CSS based on the orientation of the viewing device (ie. iPad / iPhone). Just put the following in your header and create the appropriate stylesheets. <link href="portrait.css" media="all and (orientation:portrait)" rel="stylesheet"></link> <link href="landscape.css" media="all and (orientation:landscape)" rel="stylesheet"></link>

Brackets - A Possible Replacement For Notepad++?

Read an article via Smashing Magazine regarding a new editor called Brackets  and decided to give it at try. Initial reaction is that it is actually a pretty nice editor for Web Developers.  It's more of a true IDE than Notepad++ with a nice listing of open files on the left. So, why use Brackets?  Well, I do like the IDE type layout.  Though, I do know that there is a file listing component in Notepad++. I suppose the best that Brackets has to offer now is the live CSS editing.  Linked with Google Chrome, Brackets can live update any changes to your CSS files immediately in the Chrome browser.  It's pretty nifty to see in action. Give it a try:   Brackets

EZPZ One Click Backup For Wordpress

I just learned that one of my favourite (well, my only) backup utility for Wordpress isn't in the Wordpress Plugin Repository anymore for some reason unknown even to the author of the utility.  For those of you looking for it somewhere, you can find it on his site here:  http://ezpzsolutions.net/ocb-wp-plugin/ Or you can find it here:   http://2bluesolutions.ca/files/ezpz-one-click-backup-latest.zip Why do I like this plugin so much?  It's simple, easy to install and setup, and even includes a scheduling program that will email you with a direct link to the backup when it has created a new one.  Also, it's free which is always a huge plus.  Restoring from a backup is also dirt easy as well.  It really reminds me a lot of the Joomla backup tool I use .

Proper Viewport Scaling on iPad and iPhone

So, this is a little silly and I'm a little embarrassed to say that I've spent far too much of my time on this issue. I had a multi-page site that wasn't displaying correctly on my iPad.  One page would look great, but the next would have the top menu cut off on the right and everything would be slightly zoomed in. I realized that it was a scaling issue, but for all the experimenting I did with the meta viewport tag , I couldn't get it to work. Then I thought of something...some pages didn't have as much content as the others.  The longer pages were displaying great, it was the pages short on content that weren't.  So, I went ahead and set a min-height for each page of 1050px (I figured it had to be a little larger than the 1024px portrait height of an iOS device) and voila, it worked. All the pages showed correctly.  Now, I fully admit that this is most likely a hack that isn't considered the "proper way", but I am absolutely open to sugge...

Wordpress Yoast SEO Plugin and Duplicate Titles Fix

If you're using the Yoast SEO Wordpress plugin and experiencing an issue with your site's title appearing twice (ie.  2Bluesolutions Tech Blog - What Is Kickstarter - 2Bluesolutions Tech Blog), then there is a simple fix that seems to work for many people. You need to edit the header.php file for your Wordpress theme. My particular Wordpress theme had this for the title meta tag: <title><?php wp_title('&laquo;', true, 'right'); ?> <?php bloginfo('name'); ?></title> You need to change it to something much more simplistic.  What you should replace it with is this: <title><?php wp_title(''); ?></title> That seems to fix the issue, at least for my sites.