calmestghost.com | + share

Use Firefox: Spread Firefox Affiliate Button
bhadaway@gmail.com | subscribe

Socialize: Bryan Hadaway's LinkedIn Page Bryan Hadaway's Twitter Page Bryan Hadaway's Facebook Page Bryan Hadaway's MySpace Page
Signup for HostMonster

This will enforce forwarding / redirection to the www version of your pages, enforce clean URLs by removing index.php, index.html and index.htm and by removing query characters like ? where they don’t belong adding exceptions for folders/files where they are allowed and my favorite part, forwarding / redirecting 404 error pages to the page of your choosing, check it out:

RewriteEngine on
RewriteBase /

RewriteRule ^index\.(htm|html|php) http://www.website.com/ [R=301,L]
RewriteRule ^(.*)/index\.(htm|html|php) http://www.website.com/$1/ [R=301,L]
RewriteCond %{HTTP_HOST} !^www\..*
RewriteRule ^.*$ http://www.website.com%{REQUEST_URI} [R=permanent,L]

RewriteCond %{REQUEST_URI} !^/search-results.php
RewriteCond %{QUERY_STRING} !=”"
RewriteRule ^(.*)$ /$1? [R=301,L]

ErrorDocument 404 sitemap.php

Bold parts are places you can edit. Simply paste the code in Notepad and then change website.com to your websites info, change search-results.php to the page you want to allow query strings on like a search results page, change sitemap.php to whatever page you want users to reach if they’ve reached your site in error, you can simply make it / if you want 404 errors to redirect to your homepage.

Save text file as .htaccess with “All Files” selected and then upload to the root folder of your website, this is often called public_html, just make sure it resides next to your index file.

Enjoy.

Thanks, Bryan

Bookmark and Share
Google Buzz
Tagged with:  

I personally find that this structure is the most user-friendly and seo-friendly:

<title><?php wp_title(' | ', true, 'right'); ?>Name of Blog</title>

which will result in:

Name of Page/Post | Name of Blog

For a live demo reference this very blog.

Enjoy.

Thanks, Bryan

Bookmark and Share
Google Buzz
Tagged with:  

Canonical Link WordPress Plugin

Download Now | Find on WordPress with Instructions | Help Forum

Canonical Link Script

Adding a canonical link tag to every page of a website, one by one for most is severely daunting if not completely impractical or impossible. Especially if you have thousands of pages.

The importance of the canonical link is to give Google a clean representation and suggestion of what you want your URLs to look like and how you want Google to index and display them in search results, this can also help to clear up duplicate page issues.

It’s important to understand that the canonical link is not a rule, but merely a suggestion, Google (and other search engines) can still overrule your suggestion. It might have been better named Canonical URL Suggestion.

Continue reading »

Bookmark and Share
Google Buzz
Tagged with:  

I’m now awarding a free web design per month. Learn more here:

http://www.calmestghost.com/win-a-free-website-design/

Enter by simply subscribing to my blog:

http://www.bryanhadaway.com/subscribe/

Thanks, Bryan

Bookmark and Share
Google Buzz

Demo:

Code:

CSS

.hov{
display:block;
width:245px;
height:195px;
background:url(‘images/image1.png’)}

.hov:hover{
display:block;
width:245px;
height:195px;
background:url(‘images/image2.png’)}

Change the background URL to your image locations and adjust the width and height appropriately.

XHTML

Change # to whichever URL you wish.

Avoid Flicker on Image Rollover

This happens because the 2nd image only loads on mouseover/hover. We can avoid this by preloading the images(s) and this can still be done non-JavaScript with CSS:

CSS

.preload{display:none}

XHTML

This will preload the images without showing them or messing up your design. Use this method to preload all secondary images (the images to be seen on rollover). This is a much more reliable and lightweight method than the JavaScript alternative.

That’s it. There is certainly more style and techniques you can add, but this is THE most minimal way to create a rollover image effect, if it’s possible to get simpler, let me know.

Enjoy.

Thanks, Bryan

Bookmark and Share
Google Buzz
Tagged with:  

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Visit our friends!

A few highly recommended friends...

    © 2010 BryanHadaway.com. All Rights Reserved. | Theme By: PageLines | Designed By: calmest_ghostDESIGN
    Proudly Powered By: WordPress | Articles (RSS) and Comments (RSS) | Valid XHTML
    preload