Brought to you by
2BlueSolutions Creative Web Design

Friday, July 27, 2012

.htaccess Redirect

Previously, I posted a quick .htaccess tip which you can find here:

As an addendum, I have recently discovered this great site:

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.

Tuesday, July 10, 2012

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]


Tuesday, July 3, 2012

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>

Monday, July 2, 2012

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